{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "0519.ipynb",
      "provenance": [],
      "include_colab_link": true
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/yananma/5_programs_per_day/blob/master/0519.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "67dplZeHEpMQ",
        "colab_type": "text"
      },
      "source": [
        "## 7.1 优化与深度学习"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "17iL_aJTE3mx",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        },
        "outputId": "9d593baf-8944-4037-c2a2-253f138ac2d8"
      },
      "source": [
        "!pip install mxnet d2lzh "
      ],
      "execution_count": 2,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Collecting mxnet\n",
            "\u001b[?25l  Downloading https://files.pythonhosted.org/packages/92/6c/c6e5562f8face683cec73f5d4d74a58f8572c0595d54f1fed9d923020bbd/mxnet-1.5.1.post0-py2.py3-none-manylinux1_x86_64.whl (25.4MB)\n",
            "\u001b[K     |████████████████████████████████| 25.4MB 92kB/s \n",
            "\u001b[?25hCollecting d2lzh\n",
            "  Downloading https://files.pythonhosted.org/packages/21/cd/a5dbf74fce1a2b0a805488065135a753b4419b29cce109dee960824f1468/d2lzh-0.8.11.tar.gz\n",
            "Requirement already satisfied: numpy<2.0.0,>1.16.0 in /usr/local/lib/python3.6/dist-packages (from mxnet) (1.17.3)\n",
            "Requirement already satisfied: requests<3,>=2.20.0 in /usr/local/lib/python3.6/dist-packages (from mxnet) (2.21.0)\n",
            "Collecting graphviz<0.9.0,>=0.8.1\n",
            "  Downloading https://files.pythonhosted.org/packages/53/39/4ab213673844e0c004bed8a0781a0721a3f6bb23eb8854ee75c236428892/graphviz-0.8.4-py2.py3-none-any.whl\n",
            "Requirement already satisfied: matplotlib in /usr/local/lib/python3.6/dist-packages (from d2lzh) (3.1.1)\n",
            "Requirement already satisfied: jupyter in /usr/local/lib/python3.6/dist-packages (from d2lzh) (1.0.0)\n",
            "Requirement already satisfied: urllib3<1.25,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests<3,>=2.20.0->mxnet) (1.24.3)\n",
            "Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.6/dist-packages (from requests<3,>=2.20.0->mxnet) (2.8)\n",
            "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests<3,>=2.20.0->mxnet) (2019.9.11)\n",
            "Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests<3,>=2.20.0->mxnet) (3.0.4)\n",
            "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.6/dist-packages (from matplotlib->d2lzh) (0.10.0)\n",
            "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->d2lzh) (1.1.0)\n",
            "Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->d2lzh) (2.6.1)\n",
            "Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->d2lzh) (2.4.4)\n",
            "Requirement already satisfied: qtconsole in /usr/local/lib/python3.6/dist-packages (from jupyter->d2lzh) (4.5.5)\n",
            "Requirement already satisfied: ipykernel in /usr/local/lib/python3.6/dist-packages (from jupyter->d2lzh) (4.6.1)\n",
            "Requirement already satisfied: notebook in /usr/local/lib/python3.6/dist-packages (from jupyter->d2lzh) (5.2.2)\n",
            "Requirement already satisfied: jupyter-console in /usr/local/lib/python3.6/dist-packages (from jupyter->d2lzh) (5.2.0)\n",
            "Requirement already satisfied: ipywidgets in /usr/local/lib/python3.6/dist-packages (from jupyter->d2lzh) (7.5.1)\n",
            "Requirement already satisfied: nbconvert in /usr/local/lib/python3.6/dist-packages (from jupyter->d2lzh) (5.6.1)\n",
            "Requirement already satisfied: six in /usr/local/lib/python3.6/dist-packages (from cycler>=0.10->matplotlib->d2lzh) (1.12.0)\n",
            "Requirement already satisfied: setuptools in /usr/local/lib/python3.6/dist-packages (from kiwisolver>=1.0.1->matplotlib->d2lzh) (41.4.0)\n",
            "Requirement already satisfied: jupyter-core in /usr/local/lib/python3.6/dist-packages (from qtconsole->jupyter->d2lzh) (4.6.1)\n",
            "Requirement already satisfied: ipython-genutils in /usr/local/lib/python3.6/dist-packages (from qtconsole->jupyter->d2lzh) (0.2.0)\n",
            "Requirement already satisfied: traitlets in /usr/local/lib/python3.6/dist-packages (from qtconsole->jupyter->d2lzh) (4.3.3)\n",
            "Requirement already satisfied: pygments in /usr/local/lib/python3.6/dist-packages (from qtconsole->jupyter->d2lzh) (2.1.3)\n",
            "Requirement already satisfied: jupyter-client>=4.1 in /usr/local/lib/python3.6/dist-packages (from qtconsole->jupyter->d2lzh) (5.3.4)\n",
            "Requirement already satisfied: ipython>=4.0.0 in /usr/local/lib/python3.6/dist-packages (from ipykernel->jupyter->d2lzh) (5.5.0)\n",
            "Requirement already satisfied: tornado>=4.0 in /usr/local/lib/python3.6/dist-packages (from ipykernel->jupyter->d2lzh) (4.5.3)\n",
            "Requirement already satisfied: terminado>=0.3.3; sys_platform != \"win32\" in /usr/local/lib/python3.6/dist-packages (from notebook->jupyter->d2lzh) (0.8.2)\n",
            "Requirement already satisfied: jinja2 in /usr/local/lib/python3.6/dist-packages (from notebook->jupyter->d2lzh) (2.10.3)\n",
            "Requirement already satisfied: nbformat in /usr/local/lib/python3.6/dist-packages (from notebook->jupyter->d2lzh) (4.4.0)\n",
            "Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.0 in /usr/local/lib/python3.6/dist-packages (from jupyter-console->jupyter->d2lzh) (1.0.18)\n",
            "Requirement already satisfied: widgetsnbextension~=3.5.0 in /usr/local/lib/python3.6/dist-packages (from ipywidgets->jupyter->d2lzh) (3.5.1)\n",
            "Requirement already satisfied: entrypoints>=0.2.2 in /usr/local/lib/python3.6/dist-packages (from nbconvert->jupyter->d2lzh) (0.3)\n",
            "Requirement already satisfied: defusedxml in /usr/local/lib/python3.6/dist-packages (from nbconvert->jupyter->d2lzh) (0.6.0)\n",
            "Requirement already satisfied: pandocfilters>=1.4.1 in /usr/local/lib/python3.6/dist-packages (from nbconvert->jupyter->d2lzh) (1.4.2)\n",
            "Requirement already satisfied: bleach in /usr/local/lib/python3.6/dist-packages (from nbconvert->jupyter->d2lzh) (3.1.0)\n",
            "Requirement already satisfied: mistune<2,>=0.8.1 in /usr/local/lib/python3.6/dist-packages (from nbconvert->jupyter->d2lzh) (0.8.4)\n",
            "Requirement already satisfied: testpath in /usr/local/lib/python3.6/dist-packages (from nbconvert->jupyter->d2lzh) (0.4.4)\n",
            "Requirement already satisfied: decorator in /usr/local/lib/python3.6/dist-packages (from traitlets->qtconsole->jupyter->d2lzh) (4.4.1)\n",
            "Requirement already satisfied: pyzmq>=13 in /usr/local/lib/python3.6/dist-packages (from jupyter-client>=4.1->qtconsole->jupyter->d2lzh) (17.0.0)\n",
            "Requirement already satisfied: pickleshare in /usr/local/lib/python3.6/dist-packages (from ipython>=4.0.0->ipykernel->jupyter->d2lzh) (0.7.5)\n",
            "Requirement already satisfied: pexpect; sys_platform != \"win32\" in /usr/local/lib/python3.6/dist-packages (from ipython>=4.0.0->ipykernel->jupyter->d2lzh) (4.7.0)\n",
            "Requirement already satisfied: simplegeneric>0.8 in /usr/local/lib/python3.6/dist-packages (from ipython>=4.0.0->ipykernel->jupyter->d2lzh) (0.8.1)\n",
            "Requirement already satisfied: ptyprocess; os_name != \"nt\" in /usr/local/lib/python3.6/dist-packages (from terminado>=0.3.3; sys_platform != \"win32\"->notebook->jupyter->d2lzh) (0.6.0)\n",
            "Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.6/dist-packages (from jinja2->notebook->jupyter->d2lzh) (1.1.1)\n",
            "Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in /usr/local/lib/python3.6/dist-packages (from nbformat->notebook->jupyter->d2lzh) (2.6.0)\n",
            "Requirement already satisfied: wcwidth in /usr/local/lib/python3.6/dist-packages (from prompt-toolkit<2.0.0,>=1.0.0->jupyter-console->jupyter->d2lzh) (0.1.7)\n",
            "Requirement already satisfied: webencodings in /usr/local/lib/python3.6/dist-packages (from bleach->nbconvert->jupyter->d2lzh) (0.5.1)\n",
            "Building wheels for collected packages: d2lzh\n",
            "  Building wheel for d2lzh (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
            "  Created wheel for d2lzh: filename=d2lzh-0.8.11-cp36-none-any.whl size=10011 sha256=3b388ac6fd2cada6ae80038ccc9dd764fa5a84fa83147c667c91065cc47992ba\n",
            "  Stored in directory: /root/.cache/pip/wheels/bb/4a/3e/81075d0b470000f4b5769c936f64b22be31c6bcfa81fd050d6\n",
            "Successfully built d2lzh\n",
            "Installing collected packages: graphviz, mxnet, d2lzh\n",
            "  Found existing installation: graphviz 0.10.1\n",
            "    Uninstalling graphviz-0.10.1:\n",
            "      Successfully uninstalled graphviz-0.10.1\n",
            "Successfully installed d2lzh-0.8.11 graphviz-0.8.4 mxnet-1.5.1.post0\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "mJJCBP9QFl04",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "%matplotlib inline \n",
        "import d2lzh as d2l \n",
        "from mpl_toolkits import mplot3d \n",
        "import numpy as np "
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "Rxco0dMYF8bV",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "8982e5af-e43c-4f8f-fc11-522790ca29bd"
      },
      "source": [
        "def f(x):\n",
        "    return x * np.cos(np.pi * x)\n",
        "\n",
        "d2l.set_figsize((4.5, 2.5))\n",
        "x = np.arange(-1.0, 2.0, 0.1)\n",
        "fig, = d2l.plt.plot(x, f(x))\n",
        "fig.axes.annotate('local minimum', xy=(-0.3, -0.25), xytext=(-0.77, -1.0), arrowprops=dict(arrowstyle='->'))\n",
        "fig.axes.annotate('global minimum', xy=(1.1, -0.95), xytext=(0.6, 0.8), arrowprops=dict(arrowstyle='->'))\n",
        "d2l.plt.xlabel('x')\n",
        "d2l.plt.ylabel('f(x)')"
      ],
      "execution_count": 4,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "Text(0, 0.5, 'f(x)')"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 4
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 324x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 305.329712 180.65625\" width=\"305.329712pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 305.329712 180.65625 \nL 305.329712 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 42.620313 143.1 \nL 293.720313 143.1 \nL 293.720313 7.2 \nL 42.620313 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"me500058dba\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"54.033949\" xlink:href=\"#me500058dba\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- −1.0 -->\n      <defs>\n       <path d=\"M 10.59375 35.5 \nL 73.1875 35.5 \nL 73.1875 27.203125 \nL 10.59375 27.203125 \nz\n\" id=\"DejaVuSans-8722\"/>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n       <path d=\"M 10.6875 12.40625 \nL 21 12.40625 \nL 21 0 \nL 10.6875 0 \nz\n\" id=\"DejaVuSans-46\"/>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n      </defs>\n      <g transform=\"translate(41.892543 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"147.412109\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"179.199219\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"93.391316\" xlink:href=\"#me500058dba\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- −0.5 -->\n      <defs>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(81.249909 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"147.412109\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"179.199219\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"132.748682\" xlink:href=\"#me500058dba\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 0.0 -->\n      <g transform=\"translate(124.79712 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"172.106049\" xlink:href=\"#me500058dba\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 0.5 -->\n      <g transform=\"translate(164.154487 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"211.463416\" xlink:href=\"#me500058dba\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 1.0 -->\n      <g transform=\"translate(203.511853 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_6\">\n     <g id=\"line2d_6\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"250.820783\" xlink:href=\"#me500058dba\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_6\">\n      <!-- 1.5 -->\n      <g transform=\"translate(242.86922 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_7\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"290.178149\" xlink:href=\"#me500058dba\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 2.0 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(282.226587 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_8\">\n     <!-- x -->\n     <defs>\n      <path d=\"M 54.890625 54.6875 \nL 35.109375 28.078125 \nL 55.90625 0 \nL 45.3125 0 \nL 29.390625 21.484375 \nL 13.484375 0 \nL 2.875 0 \nL 24.125 28.609375 \nL 4.6875 54.6875 \nL 15.28125 54.6875 \nL 29.78125 35.203125 \nL 44.28125 54.6875 \nz\n\" id=\"DejaVuSans-120\"/>\n     </defs>\n     <g transform=\"translate(165.210938 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_8\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"ma893fd6e5d\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620313\" xlink:href=\"#ma893fd6e5d\" y=\"134.923853\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- −1 -->\n      <g transform=\"translate(20.878125 138.723072)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-49\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620313\" xlink:href=\"#ma893fd6e5d\" y=\"91.622727\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 0 -->\n      <g transform=\"translate(29.257813 95.421946)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620313\" xlink:href=\"#ma893fd6e5d\" y=\"48.321601\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 1 -->\n      <g transform=\"translate(29.257813 52.12082)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_12\">\n     <!-- f(x) -->\n     <defs>\n      <path d=\"M 37.109375 75.984375 \nL 37.109375 68.5 \nL 28.515625 68.5 \nQ 23.6875 68.5 21.796875 66.546875 \nQ 19.921875 64.59375 19.921875 59.515625 \nL 19.921875 54.6875 \nL 34.71875 54.6875 \nL 34.71875 47.703125 \nL 19.921875 47.703125 \nL 19.921875 0 \nL 10.890625 0 \nL 10.890625 47.703125 \nL 2.296875 47.703125 \nL 2.296875 54.6875 \nL 10.890625 54.6875 \nL 10.890625 58.5 \nQ 10.890625 67.625 15.140625 71.796875 \nQ 19.390625 75.984375 28.609375 75.984375 \nz\n\" id=\"DejaVuSans-102\"/>\n      <path d=\"M 31 75.875 \nQ 24.46875 64.65625 21.28125 53.65625 \nQ 18.109375 42.671875 18.109375 31.390625 \nQ 18.109375 20.125 21.3125 9.0625 \nQ 24.515625 -2 31 -13.1875 \nL 23.1875 -13.1875 \nQ 15.875 -1.703125 12.234375 9.375 \nQ 8.59375 20.453125 8.59375 31.390625 \nQ 8.59375 42.28125 12.203125 53.3125 \nQ 15.828125 64.359375 23.1875 75.875 \nz\n\" id=\"DejaVuSans-40\"/>\n      <path d=\"M 8.015625 75.875 \nL 15.828125 75.875 \nQ 23.140625 64.359375 26.78125 53.3125 \nQ 30.421875 42.28125 30.421875 31.390625 \nQ 30.421875 20.453125 26.78125 9.375 \nQ 23.140625 -1.703125 15.828125 -13.1875 \nL 8.015625 -13.1875 \nQ 14.5 -2 17.703125 9.0625 \nQ 20.90625 20.125 20.90625 31.390625 \nQ 20.90625 42.671875 17.703125 53.65625 \nQ 14.5 64.65625 8.015625 75.875 \nz\n\" id=\"DejaVuSans-41\"/>\n     </defs>\n     <g transform=\"translate(14.798438 83.771094)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-102\"/>\n      <use x=\"35.205078\" xlink:href=\"#DejaVuSans-40\"/>\n      <use x=\"74.21875\" xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"133.398438\" xlink:href=\"#DejaVuSans-41\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_11\">\n    <path clip-path=\"url(#p5990acc980)\" d=\"M 54.033949 48.321601 \nL 61.905422 54.559091 \nL 69.776896 63.59765 \nL 77.648369 73.806493 \nL 85.519842 83.594257 \nL 93.391316 91.622727 \nL 101.262789 96.975041 \nL 109.134262 99.258256 \nL 117.005736 98.628997 \nL 124.877209 95.740909 \nL 132.748682 91.622727 \nL 140.620156 87.504545 \nL 148.491629 84.616458 \nL 156.363102 83.987198 \nL 164.234576 86.270414 \nL 172.106049 91.622727 \nL 179.977523 99.651198 \nL 187.848996 109.438962 \nL 195.720469 119.647805 \nL 203.591943 128.686364 \nL 211.463416 134.923853 \nL 219.334889 136.922727 \nL 227.206363 133.660344 \nL 235.077836 124.71002 \nL 242.949309 110.355825 \nL 250.820783 91.622727 \nL 258.692256 70.213473 \nL 266.563729 48.35473 \nL 274.435203 28.566303 \nL 282.306676 13.377273 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 42.620313 143.1 \nL 42.620313 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 293.720313 143.1 \nL 293.720313 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 42.620313 143.1 \nL 293.720313 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 42.620313 7.2 \nL 293.720313 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_7\">\n    <path d=\"M 109.113525 123.324204 \nQ 109.1229 113.886339 109.131165 105.566508 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:round;\"/>\n    <path d=\"M 107.127192 109.564519 \nL 109.131165 105.566508 \nL 111.12719 109.568492 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:round;\"/>\n   </g>\n   <g id=\"text_13\">\n    <!-- local minimum -->\n    <defs>\n     <path d=\"M 9.421875 75.984375 \nL 18.40625 75.984375 \nL 18.40625 0 \nL 9.421875 0 \nz\n\" id=\"DejaVuSans-108\"/>\n     <path d=\"M 30.609375 48.390625 \nQ 23.390625 48.390625 19.1875 42.75 \nQ 14.984375 37.109375 14.984375 27.296875 \nQ 14.984375 17.484375 19.15625 11.84375 \nQ 23.34375 6.203125 30.609375 6.203125 \nQ 37.796875 6.203125 41.984375 11.859375 \nQ 46.1875 17.53125 46.1875 27.296875 \nQ 46.1875 37.015625 41.984375 42.703125 \nQ 37.796875 48.390625 30.609375 48.390625 \nz\nM 30.609375 56 \nQ 42.328125 56 49.015625 48.375 \nQ 55.71875 40.765625 55.71875 27.296875 \nQ 55.71875 13.875 49.015625 6.21875 \nQ 42.328125 -1.421875 30.609375 -1.421875 \nQ 18.84375 -1.421875 12.171875 6.21875 \nQ 5.515625 13.875 5.515625 27.296875 \nQ 5.515625 40.765625 12.171875 48.375 \nQ 18.84375 56 30.609375 56 \nz\n\" id=\"DejaVuSans-111\"/>\n     <path d=\"M 48.78125 52.59375 \nL 48.78125 44.1875 \nQ 44.96875 46.296875 41.140625 47.34375 \nQ 37.3125 48.390625 33.40625 48.390625 \nQ 24.65625 48.390625 19.8125 42.84375 \nQ 14.984375 37.3125 14.984375 27.296875 \nQ 14.984375 17.28125 19.8125 11.734375 \nQ 24.65625 6.203125 33.40625 6.203125 \nQ 37.3125 6.203125 41.140625 7.25 \nQ 44.96875 8.296875 48.78125 10.40625 \nL 48.78125 2.09375 \nQ 45.015625 0.34375 40.984375 -0.53125 \nQ 36.96875 -1.421875 32.421875 -1.421875 \nQ 20.0625 -1.421875 12.78125 6.34375 \nQ 5.515625 14.109375 5.515625 27.296875 \nQ 5.515625 40.671875 12.859375 48.328125 \nQ 20.21875 56 33.015625 56 \nQ 37.15625 56 41.109375 55.140625 \nQ 45.0625 54.296875 48.78125 52.59375 \nz\n\" id=\"DejaVuSans-99\"/>\n     <path d=\"M 34.28125 27.484375 \nQ 23.390625 27.484375 19.1875 25 \nQ 14.984375 22.515625 14.984375 16.5 \nQ 14.984375 11.71875 18.140625 8.90625 \nQ 21.296875 6.109375 26.703125 6.109375 \nQ 34.1875 6.109375 38.703125 11.40625 \nQ 43.21875 16.703125 43.21875 25.484375 \nL 43.21875 27.484375 \nz\nM 52.203125 31.203125 \nL 52.203125 0 \nL 43.21875 0 \nL 43.21875 8.296875 \nQ 40.140625 3.328125 35.546875 0.953125 \nQ 30.953125 -1.421875 24.3125 -1.421875 \nQ 15.921875 -1.421875 10.953125 3.296875 \nQ 6 8.015625 6 15.921875 \nQ 6 25.140625 12.171875 29.828125 \nQ 18.359375 34.515625 30.609375 34.515625 \nL 43.21875 34.515625 \nL 43.21875 35.40625 \nQ 43.21875 41.609375 39.140625 45 \nQ 35.0625 48.390625 27.6875 48.390625 \nQ 23 48.390625 18.546875 47.265625 \nQ 14.109375 46.140625 10.015625 43.890625 \nL 10.015625 52.203125 \nQ 14.9375 54.109375 19.578125 55.046875 \nQ 24.21875 56 28.609375 56 \nQ 40.484375 56 46.34375 49.84375 \nQ 52.203125 43.703125 52.203125 31.203125 \nz\n\" id=\"DejaVuSans-97\"/>\n     <path id=\"DejaVuSans-32\"/>\n     <path d=\"M 52 44.1875 \nQ 55.375 50.25 60.0625 53.125 \nQ 64.75 56 71.09375 56 \nQ 79.640625 56 84.28125 50.015625 \nQ 88.921875 44.046875 88.921875 33.015625 \nL 88.921875 0 \nL 79.890625 0 \nL 79.890625 32.71875 \nQ 79.890625 40.578125 77.09375 44.375 \nQ 74.3125 48.1875 68.609375 48.1875 \nQ 61.625 48.1875 57.5625 43.546875 \nQ 53.515625 38.921875 53.515625 30.90625 \nL 53.515625 0 \nL 44.484375 0 \nL 44.484375 32.71875 \nQ 44.484375 40.625 41.703125 44.40625 \nQ 38.921875 48.1875 33.109375 48.1875 \nQ 26.21875 48.1875 22.15625 43.53125 \nQ 18.109375 38.875 18.109375 30.90625 \nL 18.109375 0 \nL 9.078125 0 \nL 9.078125 54.6875 \nL 18.109375 54.6875 \nL 18.109375 46.1875 \nQ 21.1875 51.21875 25.484375 53.609375 \nQ 29.78125 56 35.6875 56 \nQ 41.65625 56 45.828125 52.96875 \nQ 50 49.953125 52 44.1875 \nz\n\" id=\"DejaVuSans-109\"/>\n     <path d=\"M 9.421875 54.6875 \nL 18.40625 54.6875 \nL 18.40625 0 \nL 9.421875 0 \nz\nM 9.421875 75.984375 \nL 18.40625 75.984375 \nL 18.40625 64.59375 \nL 9.421875 64.59375 \nz\n\" id=\"DejaVuSans-105\"/>\n     <path d=\"M 54.890625 33.015625 \nL 54.890625 0 \nL 45.90625 0 \nL 45.90625 32.71875 \nQ 45.90625 40.484375 42.875 44.328125 \nQ 39.84375 48.1875 33.796875 48.1875 \nQ 26.515625 48.1875 22.3125 43.546875 \nQ 18.109375 38.921875 18.109375 30.90625 \nL 18.109375 0 \nL 9.078125 0 \nL 9.078125 54.6875 \nL 18.109375 54.6875 \nL 18.109375 46.1875 \nQ 21.34375 51.125 25.703125 53.5625 \nQ 30.078125 56 35.796875 56 \nQ 45.21875 56 50.046875 50.171875 \nQ 54.890625 44.34375 54.890625 33.015625 \nz\n\" id=\"DejaVuSans-110\"/>\n     <path d=\"M 8.5 21.578125 \nL 8.5 54.6875 \nL 17.484375 54.6875 \nL 17.484375 21.921875 \nQ 17.484375 14.15625 20.5 10.265625 \nQ 23.53125 6.390625 29.59375 6.390625 \nQ 36.859375 6.390625 41.078125 11.03125 \nQ 45.3125 15.671875 45.3125 23.6875 \nL 45.3125 54.6875 \nL 54.296875 54.6875 \nL 54.296875 0 \nL 45.3125 0 \nL 45.3125 8.40625 \nQ 42.046875 3.421875 37.71875 1 \nQ 33.40625 -1.421875 27.6875 -1.421875 \nQ 18.265625 -1.421875 13.375 4.4375 \nQ 8.5 10.296875 8.5 21.578125 \nz\nM 31.109375 56 \nz\n\" id=\"DejaVuSans-117\"/>\n    </defs>\n    <g transform=\"translate(72.138338 134.923853)scale(0.1 -0.1)\">\n     <use xlink:href=\"#DejaVuSans-108\"/>\n     <use x=\"27.783203\" xlink:href=\"#DejaVuSans-111\"/>\n     <use x=\"88.964844\" xlink:href=\"#DejaVuSans-99\"/>\n     <use x=\"143.945312\" xlink:href=\"#DejaVuSans-97\"/>\n     <use x=\"205.224609\" xlink:href=\"#DejaVuSans-108\"/>\n     <use x=\"233.007812\" xlink:href=\"#DejaVuSans-32\"/>\n     <use x=\"264.794922\" xlink:href=\"#DejaVuSans-109\"/>\n     <use x=\"362.207031\" xlink:href=\"#DejaVuSans-105\"/>\n     <use x=\"389.990234\" xlink:href=\"#DejaVuSans-110\"/>\n     <use x=\"453.369141\" xlink:href=\"#DejaVuSans-105\"/>\n     <use x=\"481.152344\" xlink:href=\"#DejaVuSans-109\"/>\n     <use x=\"578.564453\" xlink:href=\"#DejaVuSans-117\"/>\n     <use x=\"641.943359\" xlink:href=\"#DejaVuSans-109\"/>\n    </g>\n   </g>\n   <g id=\"patch_8\">\n    <path d=\"M 220.407145 63.062567 \nQ 219.88643 96.908884 219.382913 129.637299 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:round;\"/>\n    <path d=\"M 221.444207 125.668538 \nL 219.382913 129.637299 \nL 217.444681 125.607006 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:round;\"/>\n   </g>\n   <g id=\"text_14\">\n    <!-- global minimum -->\n    <defs>\n     <path d=\"M 45.40625 27.984375 \nQ 45.40625 37.75 41.375 43.109375 \nQ 37.359375 48.484375 30.078125 48.484375 \nQ 22.859375 48.484375 18.828125 43.109375 \nQ 14.796875 37.75 14.796875 27.984375 \nQ 14.796875 18.265625 18.828125 12.890625 \nQ 22.859375 7.515625 30.078125 7.515625 \nQ 37.359375 7.515625 41.375 12.890625 \nQ 45.40625 18.265625 45.40625 27.984375 \nz\nM 54.390625 6.78125 \nQ 54.390625 -7.171875 48.1875 -13.984375 \nQ 42 -20.796875 29.203125 -20.796875 \nQ 24.46875 -20.796875 20.265625 -20.09375 \nQ 16.0625 -19.390625 12.109375 -17.921875 \nL 12.109375 -9.1875 \nQ 16.0625 -11.328125 19.921875 -12.34375 \nQ 23.78125 -13.375 27.78125 -13.375 \nQ 36.625 -13.375 41.015625 -8.765625 \nQ 45.40625 -4.15625 45.40625 5.171875 \nL 45.40625 9.625 \nQ 42.625 4.78125 38.28125 2.390625 \nQ 33.9375 0 27.875 0 \nQ 17.828125 0 11.671875 7.65625 \nQ 5.515625 15.328125 5.515625 27.984375 \nQ 5.515625 40.671875 11.671875 48.328125 \nQ 17.828125 56 27.875 56 \nQ 33.9375 56 38.28125 53.609375 \nQ 42.625 51.21875 45.40625 46.390625 \nL 45.40625 54.6875 \nL 54.390625 54.6875 \nz\n\" id=\"DejaVuSans-103\"/>\n     <path d=\"M 48.6875 27.296875 \nQ 48.6875 37.203125 44.609375 42.84375 \nQ 40.53125 48.484375 33.40625 48.484375 \nQ 26.265625 48.484375 22.1875 42.84375 \nQ 18.109375 37.203125 18.109375 27.296875 \nQ 18.109375 17.390625 22.1875 11.75 \nQ 26.265625 6.109375 33.40625 6.109375 \nQ 40.53125 6.109375 44.609375 11.75 \nQ 48.6875 17.390625 48.6875 27.296875 \nz\nM 18.109375 46.390625 \nQ 20.953125 51.265625 25.265625 53.625 \nQ 29.59375 56 35.59375 56 \nQ 45.5625 56 51.78125 48.09375 \nQ 58.015625 40.1875 58.015625 27.296875 \nQ 58.015625 14.40625 51.78125 6.484375 \nQ 45.5625 -1.421875 35.59375 -1.421875 \nQ 29.59375 -1.421875 25.265625 0.953125 \nQ 20.953125 3.328125 18.109375 8.203125 \nL 18.109375 0 \nL 9.078125 0 \nL 9.078125 75.984375 \nL 18.109375 75.984375 \nz\n\" id=\"DejaVuSans-98\"/>\n    </defs>\n    <g transform=\"translate(179.977523 56.981826)scale(0.1 -0.1)\">\n     <use xlink:href=\"#DejaVuSans-103\"/>\n     <use x=\"63.476562\" xlink:href=\"#DejaVuSans-108\"/>\n     <use x=\"91.259766\" xlink:href=\"#DejaVuSans-111\"/>\n     <use x=\"152.441406\" xlink:href=\"#DejaVuSans-98\"/>\n     <use x=\"215.917969\" xlink:href=\"#DejaVuSans-97\"/>\n     <use x=\"277.197266\" xlink:href=\"#DejaVuSans-108\"/>\n     <use x=\"304.980469\" xlink:href=\"#DejaVuSans-32\"/>\n     <use x=\"336.767578\" xlink:href=\"#DejaVuSans-109\"/>\n     <use x=\"434.179688\" xlink:href=\"#DejaVuSans-105\"/>\n     <use x=\"461.962891\" xlink:href=\"#DejaVuSans-110\"/>\n     <use x=\"525.341797\" xlink:href=\"#DejaVuSans-105\"/>\n     <use x=\"553.125\" xlink:href=\"#DejaVuSans-109\"/>\n     <use x=\"650.537109\" xlink:href=\"#DejaVuSans-117\"/>\n     <use x=\"713.916016\" xlink:href=\"#DejaVuSans-109\"/>\n    </g>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p5990acc980\">\n   <rect height=\"135.9\" width=\"251.1\" x=\"42.620313\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "RpszF3QzHPTV",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 261
        },
        "outputId": "213e36c3-9185-4ee6-c39a-2449828863fa"
      },
      "source": [
        "x = np.arange(-2.0, 2.0, 0.1)\n",
        "fig, = d2l.plt.plot(x, x**3)\n",
        "fig.axes.annotate('saddle point', xy=(0, -0.2), xytext=(-0.52, -5.0), arrowprops=dict(arrowstyle='->'))\n",
        "d2l.plt.xlabel('x')\n",
        "d2l.plt.ylabel('f(x)');"
      ],
      "execution_count": 5,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 324x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 300.920313 180.65625\" width=\"300.920313pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 300.920313 180.65625 \nL 300.920313 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 42.620313 143.1 \nL 293.720313 143.1 \nL 293.720313 7.2 \nL 42.620313 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m4577098dd3\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"54.033949\" xlink:href=\"#m4577098dd3\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- −2 -->\n      <defs>\n       <path d=\"M 10.59375 35.5 \nL 73.1875 35.5 \nL 73.1875 27.203125 \nL 10.59375 27.203125 \nz\n\" id=\"DejaVuSans-8722\"/>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(46.662855 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"112.565417\" xlink:href=\"#m4577098dd3\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- −1 -->\n      <defs>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n      </defs>\n      <g transform=\"translate(105.194324 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-49\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"171.096886\" xlink:href=\"#m4577098dd3\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n      </defs>\n      <g transform=\"translate(167.915636 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"229.628354\" xlink:href=\"#m4577098dd3\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 1 -->\n      <g transform=\"translate(226.447104 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"288.159823\" xlink:href=\"#m4577098dd3\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 2 -->\n      <g transform=\"translate(284.978573 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_6\">\n     <!-- x -->\n     <defs>\n      <path d=\"M 54.890625 54.6875 \nL 35.109375 28.078125 \nL 55.90625 0 \nL 45.3125 0 \nL 29.390625 21.484375 \nL 13.484375 0 \nL 2.875 0 \nL 24.125 28.609375 \nL 4.6875 54.6875 \nL 15.28125 54.6875 \nL 29.78125 35.203125 \nL 44.28125 54.6875 \nz\n\" id=\"DejaVuSans-120\"/>\n     </defs>\n     <g transform=\"translate(165.210938 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_6\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m34ada39f58\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620313\" xlink:href=\"#m34ada39f58\" y=\"111.979167\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- −5 -->\n      <defs>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(20.878125 115.778386)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620313\" xlink:href=\"#m34ada39f58\" y=\"70.406566\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0 -->\n      <g transform=\"translate(29.257813 74.205785)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620313\" xlink:href=\"#m34ada39f58\" y=\"28.833966\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 5 -->\n      <g transform=\"translate(29.257813 32.633184)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_10\">\n     <!-- f(x) -->\n     <defs>\n      <path d=\"M 37.109375 75.984375 \nL 37.109375 68.5 \nL 28.515625 68.5 \nQ 23.6875 68.5 21.796875 66.546875 \nQ 19.921875 64.59375 19.921875 59.515625 \nL 19.921875 54.6875 \nL 34.71875 54.6875 \nL 34.71875 47.703125 \nL 19.921875 47.703125 \nL 19.921875 0 \nL 10.890625 0 \nL 10.890625 47.703125 \nL 2.296875 47.703125 \nL 2.296875 54.6875 \nL 10.890625 54.6875 \nL 10.890625 58.5 \nQ 10.890625 67.625 15.140625 71.796875 \nQ 19.390625 75.984375 28.609375 75.984375 \nz\n\" id=\"DejaVuSans-102\"/>\n      <path d=\"M 31 75.875 \nQ 24.46875 64.65625 21.28125 53.65625 \nQ 18.109375 42.671875 18.109375 31.390625 \nQ 18.109375 20.125 21.3125 9.0625 \nQ 24.515625 -2 31 -13.1875 \nL 23.1875 -13.1875 \nQ 15.875 -1.703125 12.234375 9.375 \nQ 8.59375 20.453125 8.59375 31.390625 \nQ 8.59375 42.28125 12.203125 53.3125 \nQ 15.828125 64.359375 23.1875 75.875 \nz\n\" id=\"DejaVuSans-40\"/>\n      <path d=\"M 8.015625 75.875 \nL 15.828125 75.875 \nQ 23.140625 64.359375 26.78125 53.3125 \nQ 30.421875 42.28125 30.421875 31.390625 \nQ 30.421875 20.453125 26.78125 9.375 \nQ 23.140625 -1.703125 15.828125 -13.1875 \nL 8.015625 -13.1875 \nQ 14.5 -2 17.703125 9.0625 \nQ 20.90625 20.125 20.90625 31.390625 \nQ 20.90625 42.671875 17.703125 53.65625 \nQ 14.5 64.65625 8.015625 75.875 \nz\n\" id=\"DejaVuSans-41\"/>\n     </defs>\n     <g transform=\"translate(14.798438 83.771094)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-102\"/>\n      <use x=\"35.205078\" xlink:href=\"#DejaVuSans-40\"/>\n      <use x=\"74.21875\" xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"133.398438\" xlink:href=\"#DejaVuSans-41\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_9\">\n    <path clip-path=\"url(#p3ede67c900)\" d=\"M 54.033949 136.922727 \nL 59.887096 127.43586 \nL 65.740243 118.896848 \nL 71.593389 111.255804 \nL 77.446536 104.462841 \nL 83.299683 98.468072 \nL 89.15283 93.221609 \nL 95.005977 88.673567 \nL 100.859124 84.774057 \nL 106.712271 81.473193 \nL 112.565417 78.721086 \nL 118.418564 76.467851 \nL 124.271711 74.663601 \nL 130.124858 73.258447 \nL 135.978005 72.202503 \nL 141.831152 71.445881 \nL 147.684299 70.938696 \nL 153.537445 70.631058 \nL 159.390592 70.473082 \nL 165.243739 70.414881 \nL 171.096886 70.406566 \nL 176.950033 70.398252 \nL 182.80318 70.34005 \nL 188.656326 70.182074 \nL 194.509473 69.874437 \nL 200.36262 69.367251 \nL 206.215767 68.61063 \nL 212.068914 67.554686 \nL 217.922061 66.149532 \nL 223.775208 64.345281 \nL 229.628354 62.092046 \nL 235.481501 59.33994 \nL 241.334648 56.039075 \nL 247.187795 52.139566 \nL 253.040942 47.591523 \nL 258.894089 42.345061 \nL 264.747236 36.350292 \nL 270.600382 29.557329 \nL 276.453529 21.916285 \nL 282.306676 13.377273 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 42.620313 143.1 \nL 42.620313 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 293.720313 143.1 \nL 293.720313 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 42.620313 143.1 \nL 293.720313 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 42.620313 7.2 \nL 293.720313 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_7\">\n    <path d=\"M 171.391806 100.37507 \nQ 171.254768 87.222572 171.129379 75.188047 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:round;\"/>\n    <path d=\"M 169.171162 79.208667 \nL 171.129379 75.188047 \nL 173.170944 79.166993 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:round;\"/>\n   </g>\n   <g id=\"text_11\">\n    <!-- saddle point -->\n    <defs>\n     <path d=\"M 44.28125 53.078125 \nL 44.28125 44.578125 \nQ 40.484375 46.53125 36.375 47.5 \nQ 32.28125 48.484375 27.875 48.484375 \nQ 21.1875 48.484375 17.84375 46.4375 \nQ 14.5 44.390625 14.5 40.28125 \nQ 14.5 37.15625 16.890625 35.375 \nQ 19.28125 33.59375 26.515625 31.984375 \nL 29.59375 31.296875 \nQ 39.15625 29.25 43.1875 25.515625 \nQ 47.21875 21.78125 47.21875 15.09375 \nQ 47.21875 7.46875 41.1875 3.015625 \nQ 35.15625 -1.421875 24.609375 -1.421875 \nQ 20.21875 -1.421875 15.453125 -0.5625 \nQ 10.6875 0.296875 5.421875 2 \nL 5.421875 11.28125 \nQ 10.40625 8.6875 15.234375 7.390625 \nQ 20.0625 6.109375 24.8125 6.109375 \nQ 31.15625 6.109375 34.5625 8.28125 \nQ 37.984375 10.453125 37.984375 14.40625 \nQ 37.984375 18.0625 35.515625 20.015625 \nQ 33.0625 21.96875 24.703125 23.78125 \nL 21.578125 24.515625 \nQ 13.234375 26.265625 9.515625 29.90625 \nQ 5.8125 33.546875 5.8125 39.890625 \nQ 5.8125 47.609375 11.28125 51.796875 \nQ 16.75 56 26.8125 56 \nQ 31.78125 56 36.171875 55.265625 \nQ 40.578125 54.546875 44.28125 53.078125 \nz\n\" id=\"DejaVuSans-115\"/>\n     <path d=\"M 34.28125 27.484375 \nQ 23.390625 27.484375 19.1875 25 \nQ 14.984375 22.515625 14.984375 16.5 \nQ 14.984375 11.71875 18.140625 8.90625 \nQ 21.296875 6.109375 26.703125 6.109375 \nQ 34.1875 6.109375 38.703125 11.40625 \nQ 43.21875 16.703125 43.21875 25.484375 \nL 43.21875 27.484375 \nz\nM 52.203125 31.203125 \nL 52.203125 0 \nL 43.21875 0 \nL 43.21875 8.296875 \nQ 40.140625 3.328125 35.546875 0.953125 \nQ 30.953125 -1.421875 24.3125 -1.421875 \nQ 15.921875 -1.421875 10.953125 3.296875 \nQ 6 8.015625 6 15.921875 \nQ 6 25.140625 12.171875 29.828125 \nQ 18.359375 34.515625 30.609375 34.515625 \nL 43.21875 34.515625 \nL 43.21875 35.40625 \nQ 43.21875 41.609375 39.140625 45 \nQ 35.0625 48.390625 27.6875 48.390625 \nQ 23 48.390625 18.546875 47.265625 \nQ 14.109375 46.140625 10.015625 43.890625 \nL 10.015625 52.203125 \nQ 14.9375 54.109375 19.578125 55.046875 \nQ 24.21875 56 28.609375 56 \nQ 40.484375 56 46.34375 49.84375 \nQ 52.203125 43.703125 52.203125 31.203125 \nz\n\" id=\"DejaVuSans-97\"/>\n     <path d=\"M 45.40625 46.390625 \nL 45.40625 75.984375 \nL 54.390625 75.984375 \nL 54.390625 0 \nL 45.40625 0 \nL 45.40625 8.203125 \nQ 42.578125 3.328125 38.25 0.953125 \nQ 33.9375 -1.421875 27.875 -1.421875 \nQ 17.96875 -1.421875 11.734375 6.484375 \nQ 5.515625 14.40625 5.515625 27.296875 \nQ 5.515625 40.1875 11.734375 48.09375 \nQ 17.96875 56 27.875 56 \nQ 33.9375 56 38.25 53.625 \nQ 42.578125 51.265625 45.40625 46.390625 \nz\nM 14.796875 27.296875 \nQ 14.796875 17.390625 18.875 11.75 \nQ 22.953125 6.109375 30.078125 6.109375 \nQ 37.203125 6.109375 41.296875 11.75 \nQ 45.40625 17.390625 45.40625 27.296875 \nQ 45.40625 37.203125 41.296875 42.84375 \nQ 37.203125 48.484375 30.078125 48.484375 \nQ 22.953125 48.484375 18.875 42.84375 \nQ 14.796875 37.203125 14.796875 27.296875 \nz\n\" id=\"DejaVuSans-100\"/>\n     <path d=\"M 9.421875 75.984375 \nL 18.40625 75.984375 \nL 18.40625 0 \nL 9.421875 0 \nz\n\" id=\"DejaVuSans-108\"/>\n     <path d=\"M 56.203125 29.59375 \nL 56.203125 25.203125 \nL 14.890625 25.203125 \nQ 15.484375 15.921875 20.484375 11.0625 \nQ 25.484375 6.203125 34.421875 6.203125 \nQ 39.59375 6.203125 44.453125 7.46875 \nQ 49.3125 8.734375 54.109375 11.28125 \nL 54.109375 2.78125 \nQ 49.265625 0.734375 44.1875 -0.34375 \nQ 39.109375 -1.421875 33.890625 -1.421875 \nQ 20.796875 -1.421875 13.15625 6.1875 \nQ 5.515625 13.8125 5.515625 26.8125 \nQ 5.515625 40.234375 12.765625 48.109375 \nQ 20.015625 56 32.328125 56 \nQ 43.359375 56 49.78125 48.890625 \nQ 56.203125 41.796875 56.203125 29.59375 \nz\nM 47.21875 32.234375 \nQ 47.125 39.59375 43.09375 43.984375 \nQ 39.0625 48.390625 32.421875 48.390625 \nQ 24.90625 48.390625 20.390625 44.140625 \nQ 15.875 39.890625 15.1875 32.171875 \nz\n\" id=\"DejaVuSans-101\"/>\n     <path id=\"DejaVuSans-32\"/>\n     <path d=\"M 18.109375 8.203125 \nL 18.109375 -20.796875 \nL 9.078125 -20.796875 \nL 9.078125 54.6875 \nL 18.109375 54.6875 \nL 18.109375 46.390625 \nQ 20.953125 51.265625 25.265625 53.625 \nQ 29.59375 56 35.59375 56 \nQ 45.5625 56 51.78125 48.09375 \nQ 58.015625 40.1875 58.015625 27.296875 \nQ 58.015625 14.40625 51.78125 6.484375 \nQ 45.5625 -1.421875 35.59375 -1.421875 \nQ 29.59375 -1.421875 25.265625 0.953125 \nQ 20.953125 3.328125 18.109375 8.203125 \nz\nM 48.6875 27.296875 \nQ 48.6875 37.203125 44.609375 42.84375 \nQ 40.53125 48.484375 33.40625 48.484375 \nQ 26.265625 48.484375 22.1875 42.84375 \nQ 18.109375 37.203125 18.109375 27.296875 \nQ 18.109375 17.390625 22.1875 11.75 \nQ 26.265625 6.109375 33.40625 6.109375 \nQ 40.53125 6.109375 44.609375 11.75 \nQ 48.6875 17.390625 48.6875 27.296875 \nz\n\" id=\"DejaVuSans-112\"/>\n     <path d=\"M 30.609375 48.390625 \nQ 23.390625 48.390625 19.1875 42.75 \nQ 14.984375 37.109375 14.984375 27.296875 \nQ 14.984375 17.484375 19.15625 11.84375 \nQ 23.34375 6.203125 30.609375 6.203125 \nQ 37.796875 6.203125 41.984375 11.859375 \nQ 46.1875 17.53125 46.1875 27.296875 \nQ 46.1875 37.015625 41.984375 42.703125 \nQ 37.796875 48.390625 30.609375 48.390625 \nz\nM 30.609375 56 \nQ 42.328125 56 49.015625 48.375 \nQ 55.71875 40.765625 55.71875 27.296875 \nQ 55.71875 13.875 49.015625 6.21875 \nQ 42.328125 -1.421875 30.609375 -1.421875 \nQ 18.84375 -1.421875 12.171875 6.21875 \nQ 5.515625 13.875 5.515625 27.296875 \nQ 5.515625 40.765625 12.171875 48.375 \nQ 18.84375 56 30.609375 56 \nz\n\" id=\"DejaVuSans-111\"/>\n     <path d=\"M 9.421875 54.6875 \nL 18.40625 54.6875 \nL 18.40625 0 \nL 9.421875 0 \nz\nM 9.421875 75.984375 \nL 18.40625 75.984375 \nL 18.40625 64.59375 \nL 9.421875 64.59375 \nz\n\" id=\"DejaVuSans-105\"/>\n     <path d=\"M 54.890625 33.015625 \nL 54.890625 0 \nL 45.90625 0 \nL 45.90625 32.71875 \nQ 45.90625 40.484375 42.875 44.328125 \nQ 39.84375 48.1875 33.796875 48.1875 \nQ 26.515625 48.1875 22.3125 43.546875 \nQ 18.109375 38.921875 18.109375 30.90625 \nL 18.109375 0 \nL 9.078125 0 \nL 9.078125 54.6875 \nL 18.109375 54.6875 \nL 18.109375 46.1875 \nQ 21.34375 51.125 25.703125 53.5625 \nQ 30.078125 56 35.796875 56 \nQ 45.21875 56 50.046875 50.171875 \nQ 54.890625 44.34375 54.890625 33.015625 \nz\n\" id=\"DejaVuSans-110\"/>\n     <path d=\"M 18.3125 70.21875 \nL 18.3125 54.6875 \nL 36.8125 54.6875 \nL 36.8125 47.703125 \nL 18.3125 47.703125 \nL 18.3125 18.015625 \nQ 18.3125 11.328125 20.140625 9.421875 \nQ 21.96875 7.515625 27.59375 7.515625 \nL 36.8125 7.515625 \nL 36.8125 0 \nL 27.59375 0 \nQ 17.1875 0 13.234375 3.875 \nQ 9.28125 7.765625 9.28125 18.015625 \nL 9.28125 47.703125 \nL 2.6875 47.703125 \nL 2.6875 54.6875 \nL 9.28125 54.6875 \nL 9.28125 70.21875 \nz\n\" id=\"DejaVuSans-116\"/>\n    </defs>\n    <g transform=\"translate(140.660522 111.979167)scale(0.1 -0.1)\">\n     <use xlink:href=\"#DejaVuSans-115\"/>\n     <use x=\"52.099609\" xlink:href=\"#DejaVuSans-97\"/>\n     <use x=\"113.378906\" xlink:href=\"#DejaVuSans-100\"/>\n     <use x=\"176.855469\" xlink:href=\"#DejaVuSans-100\"/>\n     <use x=\"240.332031\" xlink:href=\"#DejaVuSans-108\"/>\n     <use x=\"268.115234\" xlink:href=\"#DejaVuSans-101\"/>\n     <use x=\"329.638672\" xlink:href=\"#DejaVuSans-32\"/>\n     <use x=\"361.425781\" xlink:href=\"#DejaVuSans-112\"/>\n     <use x=\"424.902344\" xlink:href=\"#DejaVuSans-111\"/>\n     <use x=\"486.083984\" xlink:href=\"#DejaVuSans-105\"/>\n     <use x=\"513.867188\" xlink:href=\"#DejaVuSans-110\"/>\n     <use x=\"577.246094\" xlink:href=\"#DejaVuSans-116\"/>\n    </g>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p3ede67c900\">\n   <rect height=\"135.9\" width=\"251.1\" x=\"42.620313\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "VDZGcONwJBGN",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 221
        },
        "outputId": "4d392704-6743-4d8b-a87b-4c684dc0eeed"
      },
      "source": [
        "x, y = np.mgrid[-1: 1: 31j, -1: 1: 31j]\n",
        "z = x**2 - y**2 \n",
        "\n",
        "ax = d2l.plt.figure().add_subplot(111, projection='3d')\n",
        "ax.plot_wireframe(x, y, z, **{'rstride': 2, 'cstride': 2})\n",
        "ax.plot([0], [0], [0], 'rx')\n",
        "ticks = [-1, 0, 1]\n",
        "d2l.plt.xticks(ticks)\n",
        "d2l.plt.yticks(ticks)\n",
        "ax.set_zticks(ticks)\n",
        "d2l.plt.xlabel('x')\n",
        "d2l.plt.ylabel('y');"
      ],
      "execution_count": 6,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 324x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"150.3pt\" version=\"1.1\" viewBox=\"0 0 265.5 150.3\" width=\"265.5pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 150.3 \nL 265.5 150.3 \nL 265.5 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"patch_2\">\n   <path d=\"M 7.2 143.1 \nL 258.3 143.1 \nL 258.3 7.2 \nL 7.2 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n  </g>\n  <g id=\"pane3d_1\">\n   <g id=\"patch_3\">\n    <path d=\"M 40.487185 113.070889 \nL 112.353319 79.751289 \nL 111.156824 16.083 \nL 35.283682 46.019976 \n\" style=\"fill:#f2f2f2;opacity:0.5;stroke:#f2f2f2;stroke-linejoin:miter;\"/>\n   </g>\n  </g>\n  <g id=\"pane3d_2\">\n   <g id=\"patch_4\">\n    <path d=\"M 112.353319 79.751289 \nL 228.769699 98.379096 \nL 233.640421 32.790916 \nL 111.156824 16.083 \n\" style=\"fill:#e6e6e6;opacity:0.5;stroke:#e6e6e6;stroke-linejoin:miter;\"/>\n   </g>\n  </g>\n  <g id=\"pane3d_3\">\n   <g id=\"patch_5\">\n    <path d=\"M 40.487185 113.070889 \nL 162.972947 134.766006 \nL 228.769699 98.379096 \nL 112.353319 79.751289 \n\" style=\"fill:#ececec;opacity:0.5;stroke:#ececec;stroke-linejoin:miter;\"/>\n   </g>\n  </g>\n  <g id=\"axis3d_1\">\n   <g id=\"line2d_1\">\n    <path d=\"M 40.487185 113.070889 \nL 162.972947 134.766006 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"text_1\">\n    <!-- x -->\n    <defs>\n     <path d=\"M 54.890625 54.6875 \nL 35.109375 28.078125 \nL 55.90625 0 \nL 45.3125 0 \nL 29.390625 21.484375 \nL 13.484375 0 \nL 2.875 0 \nL 24.125 28.609375 \nL 4.6875 54.6875 \nL 15.28125 54.6875 \nL 29.78125 35.203125 \nL 44.28125 54.6875 \nz\n\" id=\"DejaVuSans-120\"/>\n    </defs>\n    <g transform=\"translate(79.250785 151.909667)scale(0.1 -0.1)\">\n     <use xlink:href=\"#DejaVuSans-120\"/>\n    </g>\n   </g>\n   <g id=\"Line3DCollection_1\">\n    <path d=\"M 47.954708 114.393564 \nL 119.473198 80.890542 \nL 118.632462 17.102748 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-width:0.8;\"/>\n    <path d=\"M 100.33065 123.670578 \nL 169.328996 88.867978 \nL 171.035205 24.250975 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-width:0.8;\"/>\n    <path d=\"M 154.838065 133.325126 \nL 221.062087 97.145799 \nL 225.514604 31.682478 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"xtick_1\">\n    <g id=\"line2d_2\">\n     <path d=\"M 48.570877 114.104918 \nL 46.720073 114.971932 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:0.8;\"/>\n    </g>\n    <g id=\"text_2\">\n     <!-- −1 -->\n     <defs>\n      <path d=\"M 10.59375 35.5 \nL 73.1875 35.5 \nL 73.1875 27.203125 \nL 10.59375 27.203125 \nz\n\" id=\"DejaVuSans-8722\"/>\n      <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n     </defs>\n     <g transform=\"translate(32.285551 133.414626)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-8722\"/>\n      <use x=\"83.789062\" xlink:href=\"#DejaVuSans-49\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"xtick_2\">\n    <g id=\"line2d_3\">\n     <path d=\"M 100.925952 123.370309 \nL 99.13778 124.272259 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:0.8;\"/>\n    </g>\n    <g id=\"text_3\">\n     <!-- 0 -->\n     <defs>\n      <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n     </defs>\n     <g transform=\"translate(88.843524 142.948134)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-48\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"xtick_3\">\n    <g id=\"line2d_4\">\n     <path d=\"M 155.410277 133.012517 \nL 153.69142 133.951558 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:0.8;\"/>\n    </g>\n    <g id=\"text_4\">\n     <!-- 1 -->\n     <g transform=\"translate(143.349377 152.87081)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-49\"/>\n     </g>\n    </g>\n   </g>\n  </g>\n  <g id=\"axis3d_2\">\n   <g id=\"line2d_5\">\n    <path d=\"M 228.769699 98.379096 \nL 162.972947 134.766006 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"text_5\">\n    <!-- y -->\n    <defs>\n     <path d=\"M 32.171875 -5.078125 \nQ 28.375 -14.84375 24.75 -17.8125 \nQ 21.140625 -20.796875 15.09375 -20.796875 \nL 7.90625 -20.796875 \nL 7.90625 -13.28125 \nL 13.1875 -13.28125 \nQ 16.890625 -13.28125 18.9375 -11.515625 \nQ 21 -9.765625 23.484375 -3.21875 \nL 25.09375 0.875 \nL 2.984375 54.6875 \nL 12.5 54.6875 \nL 29.59375 11.921875 \nL 46.6875 54.6875 \nL 56.203125 54.6875 \nz\n\" id=\"DejaVuSans-121\"/>\n    </defs>\n    <g transform=\"translate(224.303284 139.624581)scale(0.1 -0.1)\">\n     <use xlink:href=\"#DejaVuSans-121\"/>\n    </g>\n   </g>\n   <g id=\"Line3DCollection_2\">\n    <path d=\"M 40.478971 43.970091 \nL 45.390254 110.797659 \nL 167.475981 132.275739 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-width:0.8;\"/>\n    <path d=\"M 74.707339 30.464735 \nL 77.75884 95.790474 \nL 197.151948 115.86434 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-width:0.8;\"/>\n    <path d=\"M 106.671251 17.852856 \nL 108.089022 81.728363 \nL 224.877837 100.531372 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"xtick_4\">\n    <g id=\"line2d_6\">\n     <path d=\"M 166.454231 132.095986 \nL 169.521765 132.635646 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:0.8;\"/>\n    </g>\n    <g id=\"text_6\">\n     <!-- −1 -->\n     <g transform=\"translate(174.48021 149.869862)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-8722\"/>\n      <use x=\"83.789062\" xlink:href=\"#DejaVuSans-49\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"xtick_5\">\n    <g id=\"line2d_7\">\n     <path d=\"M 196.154229 115.696591 \nL 199.149539 116.2002 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:0.8;\"/>\n    </g>\n    <g id=\"text_7\">\n     <!-- 0 -->\n     <g transform=\"translate(207.834516 133.132167)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-48\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"xtick_6\">\n    <g id=\"line2d_8\">\n     <path d=\"M 223.90325 100.374464 \nL 226.829048 100.845517 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:0.8;\"/>\n    </g>\n    <g id=\"text_8\">\n     <!-- 1 -->\n     <g transform=\"translate(235.083983 117.493501)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-49\"/>\n     </g>\n    </g>\n   </g>\n  </g>\n  <g id=\"axis3d_3\">\n   <g id=\"line2d_9\">\n    <path d=\"M 228.769699 98.379096 \nL 233.640421 32.790916 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"Line3DCollection_3\">\n    <path d=\"M 228.862339 97.131618 \nL 112.330513 78.537737 \nL 40.388382 111.797743 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-width:0.8;\"/>\n    <path d=\"M 231.142669 66.425148 \nL 111.769747 48.698043 \nL 37.954325 80.433148 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-width:0.8;\"/>\n    <path d=\"M 233.537992 34.170208 \nL 111.181932 17.419065 \nL 35.393294 47.432407 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"xtick_7\">\n    <g id=\"line2d_10\">\n     <path d=\"M 227.890048 96.976479 \nL 230.808945 97.44222 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:0.8;\"/>\n    </g>\n    <g id=\"text_9\">\n     <!-- −1 -->\n     <g transform=\"translate(242.240836 103.115424)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-8722\"/>\n      <use x=\"83.789062\" xlink:href=\"#DejaVuSans-49\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"xtick_8\">\n    <g id=\"line2d_11\">\n     <path d=\"M 230.145664 66.277091 \nL 233.138804 66.721578 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:0.8;\"/>\n    </g>\n    <g id=\"text_10\">\n     <!-- 0 -->\n     <g transform=\"translate(249.211018 72.482787)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-48\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"xtick_9\">\n    <g id=\"line2d_12\">\n     <path d=\"M 232.514986 34.030153 \nL 235.586238 34.450623 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:0.8;\"/>\n    </g>\n    <g id=\"text_11\">\n     <!-- 1 -->\n     <g transform=\"translate(252.131033 40.311251)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-49\"/>\n     </g>\n    </g>\n   </g>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"line2d_13\">\n    <defs>\n     <path d=\"M -3 3 \nL 3 -3 \nM -3 -3 \nL 3 3 \n\" id=\"mcb0403d139\" style=\"stroke:#ff0000;\"/>\n    </defs>\n    <g clip-path=\"url(#pd5fac5e871)\">\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"136.143243\" xlink:href=\"#mcb0403d139\" y=\"73.313514\"/>\n    </g>\n   </g>\n   <g id=\"Line3DCollection_4\">\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 50.633789 79.513765 \nL 52.639919 74.377046 \nL 54.668328 69.518701 \nL 56.71769 64.942641 \nL 58.786647 60.652404 \nL 60.873813 56.651146 \nL 62.977777 52.941634 \nL 65.097104 49.526238 \nL 67.230341 46.406927 \nL 69.376017 43.585267 \nL 71.532652 41.062414 \nL 73.698755 38.839118 \nL 75.872827 36.915722 \nL 78.05337 35.292162 \nL 80.238887 33.967973 \nL 82.427882 32.94229 \nL 84.618869 32.213859 \nL 86.810374 31.781039 \nL 89.000935 31.641811 \nL 91.189107 31.793791 \nL 93.373466 32.234237 \nL 95.552611 32.960061 \nL 97.725166 33.967842 \nL 99.889782 35.253839 \nL 102.045142 36.814003 \nL 104.189962 38.643996 \nL 106.322991 40.739201 \nL 108.443017 43.094743 \nL 110.548865 45.705501 \nL 112.6394 48.566124 \nL 114.713531 51.671053 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 58.146625 88.619798 \nL 60.15267 83.510529 \nL 62.179222 78.676611 \nL 64.224956 74.121918 \nL 66.288521 69.849956 \nL 68.368537 65.863853 \nL 70.463603 62.166357 \nL 72.572295 58.759822 \nL 74.693176 55.646208 \nL 76.824791 52.827075 \nL 78.96568 50.303584 \nL 81.114371 48.076492 \nL 83.269392 46.146154 \nL 85.429268 44.512527 \nL 87.59253 43.175169 \nL 89.757713 42.133247 \nL 91.923361 41.385539 \nL 94.088033 40.930447 \nL 96.250301 40.765997 \nL 98.408758 40.889854 \nL 100.562017 41.299331 \nL 102.708714 41.991399 \nL 104.847515 42.962699 \nL 106.97711 44.209557 \nL 109.096226 45.727995 \nL 111.20362 47.513747 \nL 113.298086 49.562274 \nL 115.378454 51.868778 \nL 117.443595 54.428221 \nL 119.492419 57.235335 \nL 121.523878 60.284647 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 65.541795 96.541427 \nL 67.549442 91.453716 \nL 69.575882 86.638857 \nL 71.619791 82.100694 \nL 73.67982 77.842708 \nL 75.754594 73.86801 \nL 77.842717 70.179329 \nL 79.942778 66.779009 \nL 82.053348 63.669004 \nL 84.172989 60.850872 \nL 86.300255 58.325776 \nL 88.433694 56.09448 \nL 90.571854 54.157352 \nL 92.713282 52.514365 \nL 94.856534 51.165097 \nL 97.00017 50.10874 \nL 99.142764 49.344103 \nL 101.282905 48.869619 \nL 103.419195 48.683353 \nL 105.550261 48.783009 \nL 107.67475 49.165947 \nL 109.791334 49.829183 \nL 111.898714 50.769412 \nL 113.995623 51.983013 \nL 116.080822 53.466064 \nL 118.153111 55.214361 \nL 120.211322 57.223425 \nL 122.25433 59.488523 \nL 124.281044 62.004683 \nL 126.290419 64.766705 \nL 128.281449 67.769186 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 72.840106 103.309598 \nL 74.851052 98.237687 \nL 76.879127 93.436635 \nL 78.923004 88.910265 \nL 80.981334 84.662041 \nL 83.052745 80.695059 \nL 85.135845 77.012037 \nL 87.229228 73.615313 \nL 89.331477 70.506837 \nL 91.441164 67.688167 \nL 93.556856 65.160469 \nL 95.677117 62.924515 \nL 97.800512 60.980683 \nL 99.925609 59.328958 \nL 102.050983 57.968936 \nL 104.175221 56.899831 \nL 106.29692 56.120473 \nL 108.414695 55.629323 \nL 110.527179 55.424474 \nL 112.633028 55.503666 \nL 114.730921 55.86429 \nL 116.819563 56.503402 \nL 118.89769 57.417736 \nL 120.964068 58.603713 \nL 123.017497 60.057458 \nL 125.056813 61.774811 \nL 127.080887 63.751343 \nL 129.088633 65.98237 \nL 131.079001 68.462971 \nL 133.050983 71.188 \nL 135.003618 74.152106 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 80.061656 108.948787 \nL 82.077618 103.887018 \nL 84.109084 99.094606 \nL 86.154723 94.575362 \nL 88.213182 90.33274 \nL 90.28309 86.369828 \nL 92.363058 82.689338 \nL 94.451683 79.293606 \nL 96.547554 76.184579 \nL 98.649252 73.363819 \nL 100.755356 70.832495 \nL 102.86444 68.591386 \nL 104.975087 66.640878 \nL 107.085879 64.980969 \nL 109.195413 63.611268 \nL 111.302294 62.531003 \nL 113.405143 61.739025 \nL 115.502599 61.233812 \nL 117.593321 61.013482 \nL 119.675992 61.075797 \nL 121.74932 61.418175 \nL 123.812043 62.037701 \nL 125.862926 62.931136 \nL 127.900769 64.094933 \nL 129.924407 65.52525 \nL 131.93271 67.21796 \nL 133.924588 69.168669 \nL 135.898988 71.372729 \nL 137.8549 73.825258 \nL 139.791356 76.521146 \nL 141.707431 79.455082 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 87.226022 113.477284 \nL 89.248743 108.420057 \nL 91.285375 103.63117 \nL 93.334578 99.114427 \nL 95.394996 94.87328 \nL 97.465254 90.910814 \nL 99.543963 87.229742 \nL 101.629723 83.832399 \nL 103.721125 80.720736 \nL 105.816757 77.896316 \nL 107.915205 75.360316 \nL 110.015055 73.113519 \nL 112.1149 71.15632 \nL 114.213339 69.488724 \nL 116.308983 68.110353 \nL 118.400456 67.020445 \nL 120.4864 66.217864 \nL 122.565474 65.701102 \nL 124.636362 65.468291 \nL 126.697772 65.517211 \nL 128.748438 65.845295 \nL 130.787126 66.449646 \nL 132.812633 67.327047 \nL 134.823788 68.473968 \nL 136.819459 69.886589 \nL 138.798549 71.560803 \nL 140.760003 73.49224 \nL 142.702803 75.676274 \nL 144.625975 78.108045 \nL 146.528589 80.782469 \nL 148.409757 83.694258 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 94.352434 116.907381 \nL 96.383695 111.849123 \nL 98.427294 107.058663 \nL 100.481884 102.539811 \nL 102.5461 98.296019 \nL 104.618564 94.330379 \nL 106.697881 90.645606 \nL 108.782653 87.244042 \nL 110.871471 84.127641 \nL 112.962927 81.297973 \nL 115.055611 78.75622 \nL 117.148119 76.503172 \nL 119.239052 74.539229 \nL 121.327022 72.864404 \nL 123.410653 71.478325 \nL 125.488586 70.380239 \nL 127.559478 69.569014 \nL 129.62201 69.043154 \nL 131.674887 68.800797 \nL 133.716839 68.83973 \nL 135.746627 69.157396 \nL 137.763041 69.750906 \nL 139.764906 70.617051 \nL 141.751081 71.752312 \nL 143.720464 73.152876 \nL 145.671991 74.814647 \nL 147.604637 76.733261 \nL 149.517421 78.904106 \nL 151.409403 81.322328 \nL 153.279688 83.982853 \nL 155.127425 86.880404 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 101.459949 119.245487 \nL 103.501576 114.180612 \nL 105.553982 109.383471 \nL 107.61581 104.857882 \nL 109.685685 100.607311 \nL 111.76222 96.634858 \nL 113.844017 92.943248 \nL 115.929672 89.534831 \nL 118.017777 86.41157 \nL 120.106924 83.575042 \nL 122.195706 81.026435 \nL 124.282725 78.766545 \nL 126.366588 76.795779 \nL 128.445918 75.114153 \nL 130.519348 73.7213 \nL 132.585535 72.616467 \nL 134.64315 71.798528 \nL 136.690893 71.265986 \nL 138.727487 71.016981 \nL 140.751683 71.049301 \nL 142.762265 71.360388 \nL 144.758047 71.947353 \nL 146.737881 72.806983 \nL 148.700654 73.935759 \nL 150.645292 75.329865 \nL 152.570761 76.985201 \nL 154.476069 78.897402 \nL 156.360267 81.061849 \nL 158.222449 83.473686 \nL 160.061754 86.127835 \nL 161.877367 89.019012 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 108.567624 120.492157 \nL 110.621497 115.415034 \nL 112.684598 110.606056 \nL 114.755554 106.069064 \nL 116.832979 101.807539 \nL 118.915474 97.824596 \nL 121.001635 94.122977 \nL 123.09005 90.705043 \nL 125.179309 87.57277 \nL 127.268002 84.727742 \nL 129.354722 82.171156 \nL 131.438074 79.903814 \nL 133.516672 77.926125 \nL 135.589142 76.23811 \nL 137.65413 74.8394 \nL 139.710302 73.729243 \nL 141.756344 72.90651 \nL 143.79097 72.369698 \nL 145.812921 72.116943 \nL 147.820968 72.146022 \nL 149.813915 72.454371 \nL 151.790599 73.039089 \nL 153.749897 73.896953 \nL 155.690722 75.024428 \nL 157.612027 76.417686 \nL 159.512808 78.07261 \nL 161.392104 79.984821 \nL 163.248997 82.14968 \nL 165.082613 84.562315 \nL 166.892128 87.217629 \nL 168.67676 90.110317 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 115.694682 120.642048 \nL 117.762751 115.546961 \nL 119.838492 110.720916 \nL 121.920516 106.167781 \nL 124.007422 101.891061 \nL 126.097799 97.893896 \nL 128.190231 94.179044 \nL 130.283298 90.748885 \nL 132.375585 87.605408 \nL 134.465675 84.75021 \nL 136.552162 82.184495 \nL 138.63365 79.909071 \nL 140.708756 77.924351 \nL 142.776111 76.230354 \nL 144.834368 74.826711 \nL 146.882201 73.712662 \nL 148.918309 72.88707 \nL 150.94142 72.348423 \nL 152.950288 72.094842 \nL 154.943704 72.12409 \nL 156.92049 72.433584 \nL 158.879507 73.020402 \nL 160.819652 73.881299 \nL 162.739864 75.012717 \nL 164.639124 76.4108 \nL 166.516455 78.071405 \nL 168.370926 79.990121 \nL 170.201649 82.16228 \nL 172.007786 84.582978 \nL 173.788542 87.247083 \nL 175.543173 90.149259 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 122.860695 119.68379 \nL 124.944986 114.564903 \nL 127.035383 109.716449 \nL 129.130476 105.14233 \nL 131.228848 100.846086 \nL 133.329071 96.830883 \nL 135.429715 93.099507 \nL 137.529352 89.654356 \nL 139.626555 86.497438 \nL 141.719902 83.630364 \nL 143.807982 81.054346 \nL 145.889397 78.770198 \nL 147.962764 76.778336 \nL 150.026717 75.078775 \nL 152.079915 73.67114 \nL 154.121038 72.554662 \nL 156.148796 71.728191 \nL 158.161926 71.190196 \nL 160.159198 70.938777 \nL 162.139419 70.971675 \nL 164.101428 71.286278 \nL 166.044107 71.879635 \nL 167.966375 72.748467 \nL 169.867196 73.88918 \nL 171.745576 75.297879 \nL 173.600565 76.970382 \nL 175.431261 78.902233 \nL 177.236809 81.088721 \nL 179.0164 83.524894 \nL 180.769275 86.205572 \nL 182.494723 89.12537 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 130.085763 117.599775 \nL 132.188394 112.451091 \nL 134.295545 107.574737 \nL 136.405782 102.974663 \nL 138.517668 98.654447 \nL 140.629756 94.617291 \nL 142.740601 90.86601 \nL 144.84876 87.403031 \nL 146.952794 84.230379 \nL 149.051274 81.349682 \nL 151.14278 78.762164 \nL 153.22591 76.468642 \nL 155.299279 74.469533 \nL 157.361523 72.764849 \nL 159.411302 71.354203 \nL 161.447302 70.236813 \nL 163.46824 69.411508 \nL 165.472864 68.876735 \nL 167.459958 68.630565 \nL 169.42834 68.670706 \nL 171.376869 68.994508 \nL 173.304445 69.598981 \nL 175.210008 70.4808 \nL 177.092546 71.636324 \nL 178.951089 73.061606 \nL 180.784715 74.75241 \nL 182.592552 76.704223 \nL 184.373772 78.912275 \nL 186.127602 81.371551 \nL 187.853314 84.076809 \nL 189.550234 87.022597 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 137.390712 114.365856 \nL 139.513908 109.181172 \nL 141.640006 104.271245 \nL 143.76755 99.640077 \nL 145.895074 95.291295 \nL 148.021114 91.228143 \nL 150.144205 87.453473 \nL 152.262886 83.969741 \nL 154.375704 80.778998 \nL 156.481218 77.882888 \nL 158.577999 75.282647 \nL 160.664638 72.979098 \nL 162.739746 70.972657 \nL 164.801957 69.263327 \nL 166.849932 67.850708 \nL 168.882361 66.734001 \nL 170.897966 65.912007 \nL 172.895504 65.383142 \nL 174.873769 65.145442 \nL 176.831595 65.196571 \nL 178.767855 65.533834 \nL 180.681467 66.154188 \nL 182.571394 67.054251 \nL 184.436643 68.230323 \nL 186.276272 69.67839 \nL 188.089385 71.394149 \nL 189.875137 73.373016 \nL 191.632734 75.610144 \nL 193.361432 78.100442 \nL 195.06054 80.838588 \nL 196.729416 83.819047 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 144.797308 109.95094 \nL 146.943414 104.723805 \nL 149.090766 99.774404 \nL 151.237878 95.106802 \nL 153.383258 90.724683 \nL 155.525417 86.63134 \nL 157.662868 82.829669 \nL 159.794129 79.322159 \nL 161.917731 76.110891 \nL 164.032218 73.197529 \nL 166.136149 70.58332 \nL 168.228106 68.269093 \nL 170.306693 66.255261 \nL 172.370539 64.541817 \nL 174.418306 63.128344 \nL 176.448684 62.014017 \nL 178.460401 61.197607 \nL 180.452221 60.67749 \nL 182.422946 60.451657 \nL 184.371423 60.51772 \nL 186.296542 60.872926 \nL 188.197236 61.514168 \nL 190.072489 62.437997 \nL 191.921331 63.640635 \nL 193.742844 65.117993 \nL 195.536159 66.865682 \nL 197.300461 68.879031 \nL 199.034985 71.153103 \nL 200.739022 73.682711 \nL 202.411914 76.462436 \nL 204.053058 79.486644 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 152.328489 104.316478 \nL 154.499989 99.04014 \nL 156.671028 94.045093 \nL 158.840088 89.335474 \nL 161.005647 84.915035 \nL 163.166187 80.787127 \nL 165.320195 76.954693 \nL 167.466167 73.420264 \nL 169.602613 70.185952 \nL 171.728059 67.253443 \nL 173.84105 64.623999 \nL 175.940157 62.298453 \nL 178.023973 60.277212 \nL 180.091123 58.560258 \nL 182.140264 57.147152 \nL 184.170087 56.037038 \nL 186.179323 55.228647 \nL 188.166741 54.72031 \nL 190.131153 54.509962 \nL 192.071417 54.595153 \nL 193.986435 54.973062 \nL 195.875161 55.640503 \nL 197.736596 56.593946 \nL 199.569794 57.829524 \nL 201.373861 59.343053 \nL 203.147955 61.130044 \nL 204.891291 63.185723 \nL 206.603136 65.505043 \nL 208.282814 68.082706 \nL 209.929704 70.913177 \nL 211.543239 73.990704 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 160.008622 97.415821 \nL 162.208158 92.083173 \nL 164.405466 87.035985 \nL 166.59899 82.278484 \nL 168.787174 77.814494 \nL 170.968467 73.647433 \nL 173.141328 69.780302 \nL 175.304226 66.215676 \nL 177.455647 62.955703 \nL 179.594098 60.002094 \nL 181.718106 57.356125 \nL 183.826225 55.018635 \nL 185.91704 52.990024 \nL 187.989166 51.270257 \nL 190.041256 49.858869 \nL 192.071999 48.754966 \nL 194.080125 47.957234 \nL 196.064411 47.463947 \nL 198.023674 47.272975 \nL 199.956785 47.381796 \nL 201.862659 47.787504 \nL 203.740265 48.486825 \nL 205.588627 49.47613 \nL 207.406819 50.751449 \nL 209.193973 52.308487 \nL 210.949276 54.142636 \nL 212.671972 56.249001 \nL 214.361362 58.622408 \nL 216.016805 61.257427 \nL 217.637716 64.148386 \nL 219.22357 67.289397 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 50.633789 79.513765 \nL 54.406249 84.217028 \nL 58.146625 88.619798 \nL 61.857599 92.726574 \nL 65.541795 96.541427 \nL 69.201787 100.068017 \nL 72.840106 103.309598 \nL 76.459242 106.269029 \nL 80.061656 108.948787 \nL 83.649779 111.350964 \nL 87.226022 113.477284 \nL 90.792779 115.329095 \nL 94.352434 116.907381 \nL 97.907365 118.212761 \nL 101.459949 119.245487 \nL 105.012571 120.005446 \nL 108.567624 120.492157 \nL 112.127517 120.704767 \nL 115.694682 120.642048 \nL 119.271578 120.302388 \nL 122.860695 119.68379 \nL 126.464565 118.783854 \nL 130.085763 117.599775 \nL 133.726916 116.128329 \nL 137.390712 114.365856 \nL 141.079901 112.308251 \nL 144.797308 109.95094 \nL 148.54584 107.28887 \nL 152.328489 104.316478 \nL 156.14835 101.027676 \nL 160.008622 97.415821 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 54.668328 69.518701 \nL 58.439387 74.249329 \nL 62.179222 78.676611 \nL 65.890511 82.805085 \nL 69.575882 86.638857 \nL 73.237909 90.181614 \nL 76.879127 93.436635 \nL 80.50203 96.406802 \nL 84.109084 99.094606 \nL 87.702726 101.502152 \nL 91.285375 103.63117 \nL 94.859433 105.483012 \nL 98.427294 107.058663 \nL 101.991347 108.358735 \nL 105.553982 109.383471 \nL 109.117596 110.132744 \nL 112.684598 110.606056 \nL 116.257414 110.802532 \nL 119.838492 110.720916 \nL 123.430311 110.359567 \nL 127.035383 109.716449 \nL 130.656261 108.789123 \nL 134.295545 107.574737 \nL 137.955888 106.070017 \nL 141.640006 104.271245 \nL 145.35068 102.174255 \nL 149.090766 99.774404 \nL 152.863205 97.066564 \nL 156.671028 94.045093 \nL 160.517368 90.703812 \nL 164.405466 87.035985 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 58.786647 60.652404 \nL 62.552737 65.404008 \nL 66.288521 69.849956 \nL 69.996675 73.994812 \nL 73.67982 77.842708 \nL 77.340529 81.397352 \nL 80.981334 84.662041 \nL 84.60473 87.63967 \nL 88.213182 90.33274 \nL 91.809131 92.743366 \nL 95.394996 94.87328 \nL 98.973187 96.723838 \nL 102.5461 98.296019 \nL 106.116134 99.590432 \nL 109.685685 100.607311 \nL 113.25716 101.346518 \nL 116.832979 101.807539 \nL 120.415579 101.989479 \nL 124.007422 101.891061 \nL 127.611002 101.510619 \nL 131.228848 100.846086 \nL 134.86353 99.894992 \nL 138.517668 98.654447 \nL 142.193937 97.121135 \nL 145.895074 95.291295 \nL 149.623887 93.160709 \nL 153.383258 90.724683 \nL 157.176157 87.978027 \nL 161.005647 84.915035 \nL 164.874893 81.529462 \nL 168.787174 77.814494 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 62.977777 52.941634 \nL 66.735355 57.707701 \nL 70.463603 62.166357 \nL 74.165186 66.322185 \nL 77.842717 70.179329 \nL 81.498762 73.741511 \nL 85.135845 77.012037 \nL 88.756456 79.993811 \nL 92.363058 82.689338 \nL 95.958087 85.100738 \nL 99.543963 87.229742 \nL 103.123095 89.077706 \nL 106.697881 90.645606 \nL 110.270721 91.934045 \nL 113.844017 92.943248 \nL 117.42018 93.673068 \nL 121.001635 94.122977 \nL 124.590828 94.292068 \nL 128.190231 94.179044 \nL 131.802346 93.78222 \nL 135.429715 93.099507 \nL 139.074922 92.128409 \nL 142.740601 90.86601 \nL 146.429444 89.308963 \nL 150.144205 87.453473 \nL 153.887711 85.295286 \nL 157.662868 82.829669 \nL 161.472666 80.051388 \nL 165.320195 76.954693 \nL 169.208646 73.533286 \nL 173.141328 69.780302 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 67.230341 46.406927 \nL 70.975909 51.180868 \nL 74.693176 55.646208 \nL 78.384789 59.807536 \nL 82.053348 63.669004 \nL 85.701406 67.234334 \nL 89.331477 70.506837 \nL 92.946042 73.489416 \nL 96.547554 76.184579 \nL 100.138444 78.594442 \nL 103.721125 80.720736 \nL 107.298002 82.564811 \nL 110.871471 84.127641 \nL 114.443929 85.40982 \nL 118.017777 86.41157 \nL 121.595428 87.132732 \nL 125.179309 87.57277 \nL 128.771869 87.730764 \nL 132.375585 87.605408 \nL 135.992964 87.195 \nL 139.626555 86.497438 \nL 143.27895 85.510209 \nL 146.952794 84.230379 \nL 150.65079 82.65458 \nL 154.375704 80.778998 \nL 158.130378 78.599354 \nL 161.917731 76.110891 \nL 165.740774 73.308351 \nL 169.602613 70.185952 \nL 173.506461 66.737369 \nL 177.455647 62.955703 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 71.532652 41.062414 \nL 75.262781 45.837608 \nL 78.96568 50.303584 \nL 82.643978 54.464925 \nL 86.300255 58.325776 \nL 89.937049 61.889856 \nL 93.556856 65.160469 \nL 97.162145 68.140515 \nL 100.755356 70.832495 \nL 104.338907 73.23852 \nL 107.915205 75.360316 \nL 111.486643 77.199227 \nL 115.055611 78.75622 \nL 118.6245 80.031885 \nL 122.195706 81.026435 \nL 125.771639 81.739707 \nL 129.354722 82.171156 \nL 132.947405 82.319857 \nL 136.552162 82.184495 \nL 140.171505 81.763361 \nL 143.807982 81.054346 \nL 147.464191 80.054928 \nL 151.14278 78.762164 \nL 154.846458 77.172678 \nL 158.577999 75.282647 \nL 162.340253 73.087783 \nL 166.136149 70.58332 \nL 169.968709 67.763988 \nL 173.84105 64.623999 \nL 177.756401 61.157014 \nL 181.718106 57.356125 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 75.872827 36.915722 \nL 79.584169 41.685572 \nL 83.269392 46.146154 \nL 86.931101 50.302038 \nL 90.571854 54.157352 \nL 94.194164 57.715803 \nL 97.800512 60.980683 \nL 101.393345 63.954877 \nL 104.975087 66.640878 \nL 108.548142 69.040787 \nL 112.1149 71.15632 \nL 115.677744 72.988814 \nL 119.239052 74.539229 \nL 122.801204 75.808148 \nL 126.366588 76.795779 \nL 129.937605 77.501954 \nL 133.516672 77.926125 \nL 137.106231 78.067363 \nL 140.708756 77.924351 \nL 144.32675 77.495379 \nL 147.962764 76.778336 \nL 151.619391 75.770701 \nL 155.299279 74.469533 \nL 159.005139 72.871459 \nL 162.739746 70.972657 \nL 166.505953 68.768845 \nL 170.306693 66.255261 \nL 174.144991 63.426644 \nL 178.023973 60.277212 \nL 181.946872 56.800638 \nL 185.91704 52.990024 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 80.238887 33.967973 \nL 83.928195 38.725945 \nL 87.59253 43.175169 \nL 91.234466 47.320184 \nL 94.856534 51.165097 \nL 98.461221 54.713591 \nL 102.050983 57.968936 \nL 105.628246 60.934004 \nL 109.195413 63.611268 \nL 112.754868 66.002816 \nL 116.308983 68.110353 \nL 119.860124 69.935206 \nL 123.410653 71.478325 \nL 126.962937 72.740289 \nL 130.519348 73.7213 \nL 134.082277 74.421186 \nL 137.65413 74.8394 \nL 141.23734 74.975013 \nL 144.834368 74.826711 \nL 148.447713 74.392788 \nL 152.079915 73.67114 \nL 155.733564 72.659255 \nL 159.411302 71.354203 \nL 163.115834 69.752622 \nL 166.849932 67.850708 \nL 170.616445 65.644196 \nL 174.418306 63.128344 \nL 178.258538 60.297915 \nL 182.140264 57.147152 \nL 186.066719 53.669759 \nL 190.041256 49.858869 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 84.618869 32.213859 \nL 88.283017 36.953536 \nL 91.923361 41.385539 \nL 95.542444 45.514371 \nL 99.142764 49.344103 \nL 102.726781 52.878389 \nL 106.29692 56.120473 \nL 109.855581 59.0732 \nL 113.405143 61.739025 \nL 116.947965 64.120016 \nL 120.4864 66.217864 \nL 124.022789 68.033883 \nL 127.559478 69.569014 \nL 131.098812 70.82383 \nL 134.64315 71.798528 \nL 138.194864 72.492937 \nL 141.756344 72.90651 \nL 145.33001 73.038323 \nL 148.918309 72.88707 \nL 152.523729 72.451056 \nL 156.148796 71.728191 \nL 159.796089 70.715978 \nL 163.46824 69.411508 \nL 167.167945 67.811444 \nL 170.897966 65.912007 \nL 174.661143 63.708963 \nL 178.460401 61.197607 \nL 182.298756 58.372739 \nL 186.179323 55.228647 \nL 190.105331 51.759082 \nL 194.080125 47.957234 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 89.000935 31.641811 \nL 92.636924 36.356932 \nL 96.250301 40.765997 \nL 99.843571 44.873461 \nL 103.419195 48.683353 \nL 106.9796 52.199287 \nL 110.527179 55.424474 \nL 114.064303 58.36173 \nL 117.593321 61.013482 \nL 121.116566 63.381779 \nL 124.636362 65.468291 \nL 128.155029 67.27432 \nL 131.674887 68.800797 \nL 135.198261 70.048285 \nL 138.727487 71.016981 \nL 142.264916 71.706715 \nL 145.812921 72.116943 \nL 149.373902 72.24675 \nL 152.950288 72.094842 \nL 156.54455 71.659541 \nL 160.159198 70.938777 \nL 163.796795 69.930079 \nL 167.459958 68.630565 \nL 171.151366 67.036933 \nL 174.873769 65.145442 \nL 178.629993 62.951902 \nL 182.422946 60.451657 \nL 186.255632 57.63956 \nL 190.131153 54.509962 \nL 194.052723 51.05668 \nL 198.023674 47.272975 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 93.373466 32.234237 \nL 96.978446 36.91874 \nL 100.562017 41.299331 \nL 104.126644 45.380407 \nL 107.67475 49.165947 \nL 111.208722 52.659517 \nL 114.730921 55.86429 \nL 118.243681 58.783043 \nL 121.74932 61.418175 \nL 125.250141 63.771709 \nL 128.748438 65.845295 \nL 132.246502 67.640217 \nL 135.746627 69.157396 \nL 139.251111 70.397388 \nL 142.762265 71.360388 \nL 146.282416 72.046227 \nL 149.813915 72.454371 \nL 153.359136 72.583916 \nL 156.92049 72.433584 \nL 160.500424 72.001719 \nL 164.101428 71.286278 \nL 167.726044 70.284822 \nL 171.376869 68.994508 \nL 175.056563 67.412076 \nL 178.767855 65.533834 \nL 182.513551 63.35565 \nL 186.296542 60.872926 \nL 190.119809 58.080588 \nL 193.986435 54.973062 \nL 197.899615 51.544249 \nL 201.862659 47.787504 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 97.725166 33.967842 \nL 101.296438 38.615903 \nL 104.847515 42.962699 \nL 108.380813 47.012563 \nL 111.898714 50.769412 \nL 115.403567 54.236762 \nL 118.89769 57.417736 \nL 122.383382 60.315073 \nL 125.862926 62.931136 \nL 129.338588 65.267918 \nL 132.812633 67.327047 \nL 136.287318 69.109789 \nL 139.764906 70.617051 \nL 143.247666 71.849385 \nL 146.737881 72.806983 \nL 150.237851 73.489681 \nL 153.749897 73.896953 \nL 157.27637 74.027911 \nL 160.819652 73.881299 \nL 164.382165 73.455488 \nL 167.966375 72.748467 \nL 171.574799 71.757837 \nL 175.210008 70.4808 \nL 178.874638 68.914148 \nL 182.571394 67.054251 \nL 186.303056 64.897041 \nL 190.072489 62.437997 \nL 193.88265 59.672126 \nL 197.736596 56.593946 \nL 201.637494 53.197459 \nL 205.588627 49.47613 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 102.045142 36.814003 \nL 105.580176 41.420067 \nL 109.096226 45.727995 \nL 112.595663 49.742044 \nL 116.080822 53.466064 \nL 119.554007 56.903512 \nL 123.017497 60.057458 \nL 126.473549 62.930596 \nL 129.924407 65.52525 \nL 133.372302 67.84338 \nL 136.819459 69.886589 \nL 140.268104 71.656122 \nL 143.720464 73.152876 \nL 147.178777 74.377393 \nL 150.645292 75.329865 \nL 154.122278 76.010133 \nL 157.612027 76.417686 \nL 161.116858 76.551651 \nL 164.639124 76.4108 \nL 168.181217 75.993533 \nL 171.745576 75.297879 \nL 175.334685 74.321485 \nL 178.951089 73.061606 \nL 182.597393 71.515095 \nL 186.276272 69.67839 \nL 189.990478 67.547501 \nL 193.742844 65.117993 \nL 197.536297 62.38497 \nL 201.373861 59.343053 \nL 205.258669 55.986361 \nL 209.193973 52.308487 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 106.322991 40.739201 \nL 109.819427 45.298016 \nL 113.298086 49.562274 \nL 116.761289 53.536151 \nL 120.211322 57.223425 \nL 123.650444 60.627484 \nL 127.080887 63.751343 \nL 130.504868 66.597644 \nL 133.924588 69.168669 \nL 137.342237 71.466343 \nL 140.760003 73.49224 \nL 144.180072 75.247586 \nL 147.604637 76.733261 \nL 151.035898 77.949803 \nL 154.476069 78.897402 \nL 157.927386 79.575908 \nL 161.392104 79.984821 \nL 164.872511 80.123292 \nL 168.370926 79.990121 \nL 171.889708 79.583743 \nL 175.431261 78.902233 \nL 178.998039 77.943288 \nL 182.592552 76.704223 \nL 186.217371 75.181961 \nL 189.875137 73.373016 \nL 193.568568 71.273485 \nL 197.300461 68.879031 \nL 201.073706 66.184864 \nL 204.891291 63.185723 \nL 208.756309 59.875857 \nL 212.671972 56.249001 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 110.548865 45.705501 \nL 114.00452 50.212137 \nL 117.443595 54.428221 \nL 120.868358 58.357837 \nL 124.281044 62.004683 \nL 127.683863 65.372077 \nL 131.079001 68.462971 \nL 134.468627 71.279952 \nL 137.8549 73.825258 \nL 141.239968 76.100774 \nL 144.625975 78.108045 \nL 148.01507 79.848274 \nL 151.409403 81.322328 \nL 154.811137 82.530734 \nL 158.222449 83.473686 \nL 161.645534 84.151041 \nL 165.082613 84.562315 \nL 168.535936 84.706684 \nL 172.007786 84.582978 \nL 175.500485 84.189674 \nL 179.0164 83.524894 \nL 182.557948 82.586392 \nL 186.127602 81.371551 \nL 189.727896 79.877367 \nL 193.361432 78.100442 \nL 197.030888 76.036967 \nL 200.739022 73.682711 \nL 204.488683 71.033 \nL 208.282814 68.082706 \nL 212.124467 64.826218 \nL 216.016805 61.257427 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd5fac5e871)\" d=\"M 114.713531 51.671053 \nL 118.126404 56.120929 \nL 121.523878 60.284647 \nL 124.908166 64.166195 \nL 128.281449 67.769186 \nL 131.645887 71.096862 \nL 135.003618 74.152106 \nL 138.356762 76.937451 \nL 141.707431 79.455082 \nL 145.057729 81.706847 \nL 148.409757 83.694258 \nL 151.765619 85.418493 \nL 155.127425 86.880404 \nL 158.497296 88.080512 \nL 161.877367 89.019012 \nL 165.269795 89.695769 \nL 168.67676 90.110317 \nL 172.100471 90.261859 \nL 175.543173 90.149259 \nL 179.007148 89.771038 \nL 182.494723 89.12537 \nL 186.008274 88.210072 \nL 189.550234 87.022597 \nL 193.123094 85.560025 \nL 196.729416 83.819047 \nL 200.371832 81.795959 \nL 204.053058 79.486644 \nL 207.775894 76.886556 \nL 211.543239 73.990704 \nL 215.358093 70.793632 \nL 219.22357 67.289397 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"pd5fac5e871\">\n   <rect height=\"135.9\" width=\"251.1\" x=\"7.2\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "eRq1OWehKNuY",
        "colab_type": "text"
      },
      "source": [
        "## 7.2 梯度下降和随机梯度下降"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "2THdqbdCLfAd",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "%matplotlib inline \n",
        "import d2lzh as d2l \n",
        "import math \n",
        "from mxnet import nd \n",
        "import numpy as np "
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "ABUsXDTxN2JZ",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 34
        },
        "outputId": "48b55977-1392-4062-fab0-15139755c878"
      },
      "source": [
        "def gd(eta):\n",
        "    x = 10 \n",
        "    results = [x]\n",
        "    for i in range(10):\n",
        "        x -= eta * 2 * x  \n",
        "        results.append(x)\n",
        "    print('epoch 10, x:', x)\n",
        "    return results \n",
        "\n",
        "res = gd(0.2)"
      ],
      "execution_count": 8,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "epoch 10, x: 0.06046617599999997\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "5VWnef15Oer0",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 261
        },
        "outputId": "6be61dc2-ee2b-436c-92cb-00b920e0ea5c"
      },
      "source": [
        "def show_trace(res):\n",
        "    n = max(abs(min(res)), abs(max(res)), 10)\n",
        "    f_line = np.arange(-n, n, 0.1)\n",
        "    d2l.set_figsize()\n",
        "    d2l.plt.plot(f_line, [x * x for x in f_line])\n",
        "    d2l.plt.plot(res, [x * x for x in res], '-o')\n",
        "    d2l.plt.xlabel('x')\n",
        "    d2l.plt.ylabel('f(x)')\n",
        "\n",
        "show_trace(res)"
      ],
      "execution_count": 9,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 249.465625 180.65625\" width=\"249.465625pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 249.465625 180.65625 \nL 249.465625 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 46.965625 143.1 \nL 242.265625 143.1 \nL 242.265625 7.2 \nL 46.965625 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m798a1dbe2b\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"55.842898\" xlink:href=\"#m798a1dbe2b\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- −10 -->\n      <defs>\n       <path d=\"M 10.59375 35.5 \nL 73.1875 35.5 \nL 73.1875 27.203125 \nL 10.59375 27.203125 \nz\n\" id=\"DejaVuSans-8722\"/>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n      </defs>\n      <g transform=\"translate(45.290554 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"147.412109\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"100.229261\" xlink:href=\"#m798a1dbe2b\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- −5 -->\n      <defs>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(92.858168 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"144.615625\" xlink:href=\"#m798a1dbe2b\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 0 -->\n      <g transform=\"translate(141.434375 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"189.001989\" xlink:href=\"#m798a1dbe2b\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 5 -->\n      <g transform=\"translate(185.820739 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"233.388352\" xlink:href=\"#m798a1dbe2b\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 10 -->\n      <g transform=\"translate(227.025852 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_6\">\n     <!-- x -->\n     <defs>\n      <path d=\"M 54.890625 54.6875 \nL 35.109375 28.078125 \nL 55.90625 0 \nL 45.3125 0 \nL 29.390625 21.484375 \nL 13.484375 0 \nL 2.875 0 \nL 24.125 28.609375 \nL 4.6875 54.6875 \nL 15.28125 54.6875 \nL 29.78125 35.203125 \nL 44.28125 54.6875 \nz\n\" id=\"DejaVuSans-120\"/>\n     </defs>\n     <g transform=\"translate(141.65625 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_6\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m5f575c7039\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m5f575c7039\" y=\"136.922727\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0 -->\n      <g transform=\"translate(33.603125 140.721946)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m5f575c7039\" y=\"112.213636\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 20 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(27.240625 116.012855)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m5f575c7039\" y=\"87.504545\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 40 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(27.240625 91.303764)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m5f575c7039\" y=\"62.795455\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 60 -->\n      <defs>\n       <path d=\"M 33.015625 40.375 \nQ 26.375 40.375 22.484375 35.828125 \nQ 18.609375 31.296875 18.609375 23.390625 \nQ 18.609375 15.53125 22.484375 10.953125 \nQ 26.375 6.390625 33.015625 6.390625 \nQ 39.65625 6.390625 43.53125 10.953125 \nQ 47.40625 15.53125 47.40625 23.390625 \nQ 47.40625 31.296875 43.53125 35.828125 \nQ 39.65625 40.375 33.015625 40.375 \nz\nM 52.59375 71.296875 \nL 52.59375 62.3125 \nQ 48.875 64.0625 45.09375 64.984375 \nQ 41.3125 65.921875 37.59375 65.921875 \nQ 27.828125 65.921875 22.671875 59.328125 \nQ 17.53125 52.734375 16.796875 39.40625 \nQ 19.671875 43.65625 24.015625 45.921875 \nQ 28.375 48.1875 33.59375 48.1875 \nQ 44.578125 48.1875 50.953125 41.515625 \nQ 57.328125 34.859375 57.328125 23.390625 \nQ 57.328125 12.15625 50.6875 5.359375 \nQ 44.046875 -1.421875 33.015625 -1.421875 \nQ 20.359375 -1.421875 13.671875 8.265625 \nQ 6.984375 17.96875 6.984375 36.375 \nQ 6.984375 53.65625 15.1875 63.9375 \nQ 23.390625 74.21875 37.203125 74.21875 \nQ 40.921875 74.21875 44.703125 73.484375 \nQ 48.484375 72.75 52.59375 71.296875 \nz\n\" id=\"DejaVuSans-54\"/>\n      </defs>\n      <g transform=\"translate(27.240625 66.594673)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-54\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m5f575c7039\" y=\"38.086364\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 80 -->\n      <defs>\n       <path d=\"M 31.78125 34.625 \nQ 24.75 34.625 20.71875 30.859375 \nQ 16.703125 27.09375 16.703125 20.515625 \nQ 16.703125 13.921875 20.71875 10.15625 \nQ 24.75 6.390625 31.78125 6.390625 \nQ 38.8125 6.390625 42.859375 10.171875 \nQ 46.921875 13.96875 46.921875 20.515625 \nQ 46.921875 27.09375 42.890625 30.859375 \nQ 38.875 34.625 31.78125 34.625 \nz\nM 21.921875 38.8125 \nQ 15.578125 40.375 12.03125 44.71875 \nQ 8.5 49.078125 8.5 55.328125 \nQ 8.5 64.0625 14.71875 69.140625 \nQ 20.953125 74.21875 31.78125 74.21875 \nQ 42.671875 74.21875 48.875 69.140625 \nQ 55.078125 64.0625 55.078125 55.328125 \nQ 55.078125 49.078125 51.53125 44.71875 \nQ 48 40.375 41.703125 38.8125 \nQ 48.828125 37.15625 52.796875 32.3125 \nQ 56.78125 27.484375 56.78125 20.515625 \nQ 56.78125 9.90625 50.3125 4.234375 \nQ 43.84375 -1.421875 31.78125 -1.421875 \nQ 19.734375 -1.421875 13.25 4.234375 \nQ 6.78125 9.90625 6.78125 20.515625 \nQ 6.78125 27.484375 10.78125 32.3125 \nQ 14.796875 37.15625 21.921875 38.8125 \nz\nM 18.3125 54.390625 \nQ 18.3125 48.734375 21.84375 45.5625 \nQ 25.390625 42.390625 31.78125 42.390625 \nQ 38.140625 42.390625 41.71875 45.5625 \nQ 45.3125 48.734375 45.3125 54.390625 \nQ 45.3125 60.0625 41.71875 63.234375 \nQ 38.140625 66.40625 31.78125 66.40625 \nQ 25.390625 66.40625 21.84375 63.234375 \nQ 18.3125 60.0625 18.3125 54.390625 \nz\n\" id=\"DejaVuSans-56\"/>\n      </defs>\n      <g transform=\"translate(27.240625 41.885582)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-56\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_11\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m5f575c7039\" y=\"13.377273\"/>\n      </g>\n     </g>\n     <g id=\"text_12\">\n      <!-- 100 -->\n      <g transform=\"translate(20.878125 17.176491)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_13\">\n     <!-- f(x) -->\n     <defs>\n      <path d=\"M 37.109375 75.984375 \nL 37.109375 68.5 \nL 28.515625 68.5 \nQ 23.6875 68.5 21.796875 66.546875 \nQ 19.921875 64.59375 19.921875 59.515625 \nL 19.921875 54.6875 \nL 34.71875 54.6875 \nL 34.71875 47.703125 \nL 19.921875 47.703125 \nL 19.921875 0 \nL 10.890625 0 \nL 10.890625 47.703125 \nL 2.296875 47.703125 \nL 2.296875 54.6875 \nL 10.890625 54.6875 \nL 10.890625 58.5 \nQ 10.890625 67.625 15.140625 71.796875 \nQ 19.390625 75.984375 28.609375 75.984375 \nz\n\" id=\"DejaVuSans-102\"/>\n      <path d=\"M 31 75.875 \nQ 24.46875 64.65625 21.28125 53.65625 \nQ 18.109375 42.671875 18.109375 31.390625 \nQ 18.109375 20.125 21.3125 9.0625 \nQ 24.515625 -2 31 -13.1875 \nL 23.1875 -13.1875 \nQ 15.875 -1.703125 12.234375 9.375 \nQ 8.59375 20.453125 8.59375 31.390625 \nQ 8.59375 42.28125 12.203125 53.3125 \nQ 15.828125 64.359375 23.1875 75.875 \nz\n\" id=\"DejaVuSans-40\"/>\n      <path d=\"M 8.015625 75.875 \nL 15.828125 75.875 \nQ 23.140625 64.359375 26.78125 53.3125 \nQ 30.421875 42.28125 30.421875 31.390625 \nQ 30.421875 20.453125 26.78125 9.375 \nQ 23.140625 -1.703125 15.828125 -13.1875 \nL 8.015625 -13.1875 \nQ 14.5 -2 17.703125 9.0625 \nQ 20.90625 20.125 20.90625 31.390625 \nQ 20.90625 42.671875 17.703125 53.65625 \nQ 14.5 64.65625 8.015625 75.875 \nz\n\" id=\"DejaVuSans-41\"/>\n     </defs>\n     <g transform=\"translate(14.798438 83.771094)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-102\"/>\n      <use x=\"35.205078\" xlink:href=\"#DejaVuSans-40\"/>\n      <use x=\"74.21875\" xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"133.398438\" xlink:href=\"#DejaVuSans-41\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_12\">\n    <path clip-path=\"url(#p6e280af114)\" d=\"M 55.842898 13.377273 \nL 60.281534 25.422955 \nL 64.72017 36.850909 \nL 69.158807 47.661136 \nL 73.597443 57.853636 \nL 78.03608 67.428409 \nL 82.474716 76.385455 \nL 86.025625 83.106327 \nL 89.576534 89.431855 \nL 93.127443 95.362036 \nL 96.678352 100.896873 \nL 100.229261 106.036364 \nL 103.78017 110.780509 \nL 107.33108 115.129309 \nL 110.881989 119.082764 \nL 114.432898 122.640873 \nL 117.983807 125.803636 \nL 120.646989 127.916264 \nL 123.31017 129.806509 \nL 125.973352 131.474373 \nL 128.636534 132.919855 \nL 131.299716 134.142955 \nL 133.962898 135.143673 \nL 136.62608 135.922009 \nL 139.289261 136.477964 \nL 141.952443 136.811536 \nL 144.615625 136.922727 \nL 147.278807 136.811536 \nL 149.941989 136.477964 \nL 152.60517 135.922009 \nL 155.268352 135.143673 \nL 157.931534 134.142955 \nL 160.594716 132.919855 \nL 163.257898 131.474373 \nL 165.92108 129.806509 \nL 168.584261 127.916264 \nL 171.247443 125.803636 \nL 173.910625 123.468627 \nL 177.461534 120.009355 \nL 181.012443 116.154736 \nL 184.563352 111.904773 \nL 188.114261 107.259464 \nL 191.66517 102.218809 \nL 195.21608 96.782809 \nL 198.766989 90.951464 \nL 202.317898 84.724773 \nL 205.868807 78.102736 \nL 209.419716 71.085355 \nL 213.858352 61.757673 \nL 218.296989 51.812264 \nL 222.735625 41.249127 \nL 227.174261 30.068264 \nL 231.612898 18.269673 \nL 232.500625 15.835827 \nL 232.500625 15.835827 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"line2d_13\">\n    <path clip-path=\"url(#p6e280af114)\" d=\"M 233.388352 13.377273 \nL 197.879261 92.446364 \nL 176.573807 120.911236 \nL 163.790534 131.158591 \nL 156.12057 134.847638 \nL 151.518592 136.175695 \nL 148.757405 136.653796 \nL 147.100693 136.825912 \nL 146.106666 136.887874 \nL 145.51025 136.91018 \nL 145.1524 136.91821 \n\" style=\"fill:none;stroke:#ff7f0e;stroke-linecap:square;stroke-width:1.5;\"/>\n    <defs>\n     <path d=\"M 0 3 \nC 0.795609 3 1.55874 2.683901 2.12132 2.12132 \nC 2.683901 1.55874 3 0.795609 3 0 \nC 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \nC 1.55874 -2.683901 0.795609 -3 0 -3 \nC -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \nC -2.683901 -1.55874 -3 -0.795609 -3 0 \nC -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \nC -1.55874 2.683901 -0.795609 3 0 3 \nz\n\" id=\"m2e2760f8a3\" style=\"stroke:#ff7f0e;\"/>\n    </defs>\n    <g clip-path=\"url(#p6e280af114)\">\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"233.388352\" xlink:href=\"#m2e2760f8a3\" y=\"13.377273\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"197.879261\" xlink:href=\"#m2e2760f8a3\" y=\"92.446364\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"176.573807\" xlink:href=\"#m2e2760f8a3\" y=\"120.911236\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"163.790534\" xlink:href=\"#m2e2760f8a3\" y=\"131.158591\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"156.12057\" xlink:href=\"#m2e2760f8a3\" y=\"134.847638\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"151.518592\" xlink:href=\"#m2e2760f8a3\" y=\"136.175695\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"148.757405\" xlink:href=\"#m2e2760f8a3\" y=\"136.653796\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"147.100693\" xlink:href=\"#m2e2760f8a3\" y=\"136.825912\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"146.106666\" xlink:href=\"#m2e2760f8a3\" y=\"136.887874\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"145.51025\" xlink:href=\"#m2e2760f8a3\" y=\"136.91018\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"145.1524\" xlink:href=\"#m2e2760f8a3\" y=\"136.91821\"/>\n    </g>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 46.965625 143.1 \nL 46.965625 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 242.265625 143.1 \nL 242.265625 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 46.965625 143.1 \nL 242.265625 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 46.965625 7.2 \nL 242.265625 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p6e280af114\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"46.965625\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "ufURZENrPgRv",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "f4db5ac2-ee2e-4005-a64b-c553fab576f5"
      },
      "source": [
        "show_trace(gd(0.05))"
      ],
      "execution_count": 10,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "epoch 10, x: 3.4867844009999995\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 249.465625 180.65625\" width=\"249.465625pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 249.465625 180.65625 \nL 249.465625 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 46.965625 143.1 \nL 242.265625 143.1 \nL 242.265625 7.2 \nL 46.965625 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m30f4aa9bec\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"55.842898\" xlink:href=\"#m30f4aa9bec\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- −10 -->\n      <defs>\n       <path d=\"M 10.59375 35.5 \nL 73.1875 35.5 \nL 73.1875 27.203125 \nL 10.59375 27.203125 \nz\n\" id=\"DejaVuSans-8722\"/>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n      </defs>\n      <g transform=\"translate(45.290554 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"147.412109\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"100.229261\" xlink:href=\"#m30f4aa9bec\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- −5 -->\n      <defs>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(92.858168 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"144.615625\" xlink:href=\"#m30f4aa9bec\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 0 -->\n      <g transform=\"translate(141.434375 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"189.001989\" xlink:href=\"#m30f4aa9bec\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 5 -->\n      <g transform=\"translate(185.820739 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"233.388352\" xlink:href=\"#m30f4aa9bec\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 10 -->\n      <g transform=\"translate(227.025852 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_6\">\n     <!-- x -->\n     <defs>\n      <path d=\"M 54.890625 54.6875 \nL 35.109375 28.078125 \nL 55.90625 0 \nL 45.3125 0 \nL 29.390625 21.484375 \nL 13.484375 0 \nL 2.875 0 \nL 24.125 28.609375 \nL 4.6875 54.6875 \nL 15.28125 54.6875 \nL 29.78125 35.203125 \nL 44.28125 54.6875 \nz\n\" id=\"DejaVuSans-120\"/>\n     </defs>\n     <g transform=\"translate(141.65625 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_6\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m4025f4b871\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m4025f4b871\" y=\"136.922727\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0 -->\n      <g transform=\"translate(33.603125 140.721946)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m4025f4b871\" y=\"112.213636\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 20 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(27.240625 116.012855)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m4025f4b871\" y=\"87.504545\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 40 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(27.240625 91.303764)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m4025f4b871\" y=\"62.795455\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 60 -->\n      <defs>\n       <path d=\"M 33.015625 40.375 \nQ 26.375 40.375 22.484375 35.828125 \nQ 18.609375 31.296875 18.609375 23.390625 \nQ 18.609375 15.53125 22.484375 10.953125 \nQ 26.375 6.390625 33.015625 6.390625 \nQ 39.65625 6.390625 43.53125 10.953125 \nQ 47.40625 15.53125 47.40625 23.390625 \nQ 47.40625 31.296875 43.53125 35.828125 \nQ 39.65625 40.375 33.015625 40.375 \nz\nM 52.59375 71.296875 \nL 52.59375 62.3125 \nQ 48.875 64.0625 45.09375 64.984375 \nQ 41.3125 65.921875 37.59375 65.921875 \nQ 27.828125 65.921875 22.671875 59.328125 \nQ 17.53125 52.734375 16.796875 39.40625 \nQ 19.671875 43.65625 24.015625 45.921875 \nQ 28.375 48.1875 33.59375 48.1875 \nQ 44.578125 48.1875 50.953125 41.515625 \nQ 57.328125 34.859375 57.328125 23.390625 \nQ 57.328125 12.15625 50.6875 5.359375 \nQ 44.046875 -1.421875 33.015625 -1.421875 \nQ 20.359375 -1.421875 13.671875 8.265625 \nQ 6.984375 17.96875 6.984375 36.375 \nQ 6.984375 53.65625 15.1875 63.9375 \nQ 23.390625 74.21875 37.203125 74.21875 \nQ 40.921875 74.21875 44.703125 73.484375 \nQ 48.484375 72.75 52.59375 71.296875 \nz\n\" id=\"DejaVuSans-54\"/>\n      </defs>\n      <g transform=\"translate(27.240625 66.594673)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-54\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m4025f4b871\" y=\"38.086364\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 80 -->\n      <defs>\n       <path d=\"M 31.78125 34.625 \nQ 24.75 34.625 20.71875 30.859375 \nQ 16.703125 27.09375 16.703125 20.515625 \nQ 16.703125 13.921875 20.71875 10.15625 \nQ 24.75 6.390625 31.78125 6.390625 \nQ 38.8125 6.390625 42.859375 10.171875 \nQ 46.921875 13.96875 46.921875 20.515625 \nQ 46.921875 27.09375 42.890625 30.859375 \nQ 38.875 34.625 31.78125 34.625 \nz\nM 21.921875 38.8125 \nQ 15.578125 40.375 12.03125 44.71875 \nQ 8.5 49.078125 8.5 55.328125 \nQ 8.5 64.0625 14.71875 69.140625 \nQ 20.953125 74.21875 31.78125 74.21875 \nQ 42.671875 74.21875 48.875 69.140625 \nQ 55.078125 64.0625 55.078125 55.328125 \nQ 55.078125 49.078125 51.53125 44.71875 \nQ 48 40.375 41.703125 38.8125 \nQ 48.828125 37.15625 52.796875 32.3125 \nQ 56.78125 27.484375 56.78125 20.515625 \nQ 56.78125 9.90625 50.3125 4.234375 \nQ 43.84375 -1.421875 31.78125 -1.421875 \nQ 19.734375 -1.421875 13.25 4.234375 \nQ 6.78125 9.90625 6.78125 20.515625 \nQ 6.78125 27.484375 10.78125 32.3125 \nQ 14.796875 37.15625 21.921875 38.8125 \nz\nM 18.3125 54.390625 \nQ 18.3125 48.734375 21.84375 45.5625 \nQ 25.390625 42.390625 31.78125 42.390625 \nQ 38.140625 42.390625 41.71875 45.5625 \nQ 45.3125 48.734375 45.3125 54.390625 \nQ 45.3125 60.0625 41.71875 63.234375 \nQ 38.140625 66.40625 31.78125 66.40625 \nQ 25.390625 66.40625 21.84375 63.234375 \nQ 18.3125 60.0625 18.3125 54.390625 \nz\n\" id=\"DejaVuSans-56\"/>\n      </defs>\n      <g transform=\"translate(27.240625 41.885582)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-56\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_11\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m4025f4b871\" y=\"13.377273\"/>\n      </g>\n     </g>\n     <g id=\"text_12\">\n      <!-- 100 -->\n      <g transform=\"translate(20.878125 17.176491)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_13\">\n     <!-- f(x) -->\n     <defs>\n      <path d=\"M 37.109375 75.984375 \nL 37.109375 68.5 \nL 28.515625 68.5 \nQ 23.6875 68.5 21.796875 66.546875 \nQ 19.921875 64.59375 19.921875 59.515625 \nL 19.921875 54.6875 \nL 34.71875 54.6875 \nL 34.71875 47.703125 \nL 19.921875 47.703125 \nL 19.921875 0 \nL 10.890625 0 \nL 10.890625 47.703125 \nL 2.296875 47.703125 \nL 2.296875 54.6875 \nL 10.890625 54.6875 \nL 10.890625 58.5 \nQ 10.890625 67.625 15.140625 71.796875 \nQ 19.390625 75.984375 28.609375 75.984375 \nz\n\" id=\"DejaVuSans-102\"/>\n      <path d=\"M 31 75.875 \nQ 24.46875 64.65625 21.28125 53.65625 \nQ 18.109375 42.671875 18.109375 31.390625 \nQ 18.109375 20.125 21.3125 9.0625 \nQ 24.515625 -2 31 -13.1875 \nL 23.1875 -13.1875 \nQ 15.875 -1.703125 12.234375 9.375 \nQ 8.59375 20.453125 8.59375 31.390625 \nQ 8.59375 42.28125 12.203125 53.3125 \nQ 15.828125 64.359375 23.1875 75.875 \nz\n\" id=\"DejaVuSans-40\"/>\n      <path d=\"M 8.015625 75.875 \nL 15.828125 75.875 \nQ 23.140625 64.359375 26.78125 53.3125 \nQ 30.421875 42.28125 30.421875 31.390625 \nQ 30.421875 20.453125 26.78125 9.375 \nQ 23.140625 -1.703125 15.828125 -13.1875 \nL 8.015625 -13.1875 \nQ 14.5 -2 17.703125 9.0625 \nQ 20.90625 20.125 20.90625 31.390625 \nQ 20.90625 42.671875 17.703125 53.65625 \nQ 14.5 64.65625 8.015625 75.875 \nz\n\" id=\"DejaVuSans-41\"/>\n     </defs>\n     <g transform=\"translate(14.798438 83.771094)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-102\"/>\n      <use x=\"35.205078\" xlink:href=\"#DejaVuSans-40\"/>\n      <use x=\"74.21875\" xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"133.398438\" xlink:href=\"#DejaVuSans-41\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_12\">\n    <path clip-path=\"url(#p297182b6cc)\" d=\"M 55.842898 13.377273 \nL 60.281534 25.422955 \nL 64.72017 36.850909 \nL 69.158807 47.661136 \nL 73.597443 57.853636 \nL 78.03608 67.428409 \nL 82.474716 76.385455 \nL 86.025625 83.106327 \nL 89.576534 89.431855 \nL 93.127443 95.362036 \nL 96.678352 100.896873 \nL 100.229261 106.036364 \nL 103.78017 110.780509 \nL 107.33108 115.129309 \nL 110.881989 119.082764 \nL 114.432898 122.640873 \nL 117.983807 125.803636 \nL 120.646989 127.916264 \nL 123.31017 129.806509 \nL 125.973352 131.474373 \nL 128.636534 132.919855 \nL 131.299716 134.142955 \nL 133.962898 135.143673 \nL 136.62608 135.922009 \nL 139.289261 136.477964 \nL 141.952443 136.811536 \nL 144.615625 136.922727 \nL 147.278807 136.811536 \nL 149.941989 136.477964 \nL 152.60517 135.922009 \nL 155.268352 135.143673 \nL 157.931534 134.142955 \nL 160.594716 132.919855 \nL 163.257898 131.474373 \nL 165.92108 129.806509 \nL 168.584261 127.916264 \nL 171.247443 125.803636 \nL 173.910625 123.468627 \nL 177.461534 120.009355 \nL 181.012443 116.154736 \nL 184.563352 111.904773 \nL 188.114261 107.259464 \nL 191.66517 102.218809 \nL 195.21608 96.782809 \nL 198.766989 90.951464 \nL 202.317898 84.724773 \nL 205.868807 78.102736 \nL 209.419716 71.085355 \nL 213.858352 61.757673 \nL 218.296989 51.812264 \nL 222.735625 41.249127 \nL 227.174261 30.068264 \nL 231.612898 18.269673 \nL 232.500625 15.835827 \nL 232.500625 15.835827 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"line2d_13\">\n    <path clip-path=\"url(#p297182b6cc)\" d=\"M 233.388352 13.377273 \nL 224.51108 36.850909 \nL 216.521534 55.864555 \nL 209.330943 71.265607 \nL 202.859411 83.74046 \nL 197.035033 93.845091 \nL 191.793092 102.029842 \nL 187.075345 108.65949 \nL 182.829373 114.029505 \nL 179.007998 118.379217 \nL 175.568761 121.902484 \n\" style=\"fill:none;stroke:#ff7f0e;stroke-linecap:square;stroke-width:1.5;\"/>\n    <defs>\n     <path d=\"M 0 3 \nC 0.795609 3 1.55874 2.683901 2.12132 2.12132 \nC 2.683901 1.55874 3 0.795609 3 0 \nC 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \nC 1.55874 -2.683901 0.795609 -3 0 -3 \nC -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \nC -2.683901 -1.55874 -3 -0.795609 -3 0 \nC -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \nC -1.55874 2.683901 -0.795609 3 0 3 \nz\n\" id=\"md0cf6e7f3f\" style=\"stroke:#ff7f0e;\"/>\n    </defs>\n    <g clip-path=\"url(#p297182b6cc)\">\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"233.388352\" xlink:href=\"#md0cf6e7f3f\" y=\"13.377273\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"224.51108\" xlink:href=\"#md0cf6e7f3f\" y=\"36.850909\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"216.521534\" xlink:href=\"#md0cf6e7f3f\" y=\"55.864555\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"209.330943\" xlink:href=\"#md0cf6e7f3f\" y=\"71.265607\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"202.859411\" xlink:href=\"#md0cf6e7f3f\" y=\"83.74046\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"197.035033\" xlink:href=\"#md0cf6e7f3f\" y=\"93.845091\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"191.793092\" xlink:href=\"#md0cf6e7f3f\" y=\"102.029842\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"187.075345\" xlink:href=\"#md0cf6e7f3f\" y=\"108.65949\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"182.829373\" xlink:href=\"#md0cf6e7f3f\" y=\"114.029505\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"179.007998\" xlink:href=\"#md0cf6e7f3f\" y=\"118.379217\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"175.568761\" xlink:href=\"#md0cf6e7f3f\" y=\"121.902484\"/>\n    </g>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 46.965625 143.1 \nL 46.965625 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 242.265625 143.1 \nL 242.265625 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 46.965625 143.1 \nL 242.265625 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 46.965625 7.2 \nL 242.265625 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p297182b6cc\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"46.965625\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "LtmYBwD5Ps7Y",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 282
        },
        "outputId": "3d383f72-38e7-408e-9187-7d11844cd0aa"
      },
      "source": [
        "show_trace(gd(1.1))"
      ],
      "execution_count": 11,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "epoch 10, x: 61.917364224000096\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"183.635391pt\" version=\"1.1\" viewBox=\"0 0 255.828125 183.635391\" width=\"255.828125pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 183.635391 \nL 255.828125 183.635391 \nL 255.828125 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 53.328125 146.079141 \nL 248.628125 146.079141 \nL 248.628125 10.179141 \nL 53.328125 10.179141 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"mb7a06d93fc\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"79.29167\" xlink:href=\"#mb7a06d93fc\" y=\"146.079141\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- −50 -->\n      <defs>\n       <path d=\"M 10.59375 35.5 \nL 73.1875 35.5 \nL 73.1875 27.203125 \nL 10.59375 27.203125 \nz\n\" id=\"DejaVuSans-8722\"/>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n      </defs>\n      <g transform=\"translate(68.739326 160.677578)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-53\"/>\n       <use x=\"147.412109\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"115.134897\" xlink:href=\"#mb7a06d93fc\" y=\"146.079141\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- −25 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(104.582554 160.677578)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"147.412109\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"150.978125\" xlink:href=\"#mb7a06d93fc\" y=\"146.079141\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 0 -->\n      <g transform=\"translate(147.796875 160.677578)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"186.821353\" xlink:href=\"#mb7a06d93fc\" y=\"146.079141\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 25 -->\n      <g transform=\"translate(180.458853 160.677578)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"222.66458\" xlink:href=\"#mb7a06d93fc\" y=\"146.079141\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 50 -->\n      <g transform=\"translate(216.30208 160.677578)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-53\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_6\">\n     <!-- x -->\n     <defs>\n      <path d=\"M 54.890625 54.6875 \nL 35.109375 28.078125 \nL 55.90625 0 \nL 45.3125 0 \nL 29.390625 21.484375 \nL 13.484375 0 \nL 2.875 0 \nL 24.125 28.609375 \nL 4.6875 54.6875 \nL 15.28125 54.6875 \nL 29.78125 35.203125 \nL 44.28125 54.6875 \nz\n\" id=\"DejaVuSans-120\"/>\n     </defs>\n     <g transform=\"translate(148.01875 174.355703)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_6\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"mfc57fa1946\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"53.328125\" xlink:href=\"#mfc57fa1946\" y=\"139.901878\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0 -->\n      <g transform=\"translate(39.965625 143.701097)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"53.328125\" xlink:href=\"#mfc57fa1946\" y=\"107.676213\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 1000 -->\n      <defs>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n      </defs>\n      <g transform=\"translate(20.878125 111.475432)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"53.328125\" xlink:href=\"#mfc57fa1946\" y=\"75.450548\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 2000 -->\n      <g transform=\"translate(20.878125 79.249767)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"53.328125\" xlink:href=\"#mfc57fa1946\" y=\"43.224884\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 3000 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 47.024102)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"53.328125\" xlink:href=\"#mfc57fa1946\" y=\"10.999219\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 4000 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(20.878125 14.798437)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_12\">\n     <!-- f(x) -->\n     <defs>\n      <path d=\"M 37.109375 75.984375 \nL 37.109375 68.5 \nL 28.515625 68.5 \nQ 23.6875 68.5 21.796875 66.546875 \nQ 19.921875 64.59375 19.921875 59.515625 \nL 19.921875 54.6875 \nL 34.71875 54.6875 \nL 34.71875 47.703125 \nL 19.921875 47.703125 \nL 19.921875 0 \nL 10.890625 0 \nL 10.890625 47.703125 \nL 2.296875 47.703125 \nL 2.296875 54.6875 \nL 10.890625 54.6875 \nL 10.890625 58.5 \nQ 10.890625 67.625 15.140625 71.796875 \nQ 19.390625 75.984375 28.609375 75.984375 \nz\n\" id=\"DejaVuSans-102\"/>\n      <path d=\"M 31 75.875 \nQ 24.46875 64.65625 21.28125 53.65625 \nQ 18.109375 42.671875 18.109375 31.390625 \nQ 18.109375 20.125 21.3125 9.0625 \nQ 24.515625 -2 31 -13.1875 \nL 23.1875 -13.1875 \nQ 15.875 -1.703125 12.234375 9.375 \nQ 8.59375 20.453125 8.59375 31.390625 \nQ 8.59375 42.28125 12.203125 53.3125 \nQ 15.828125 64.359375 23.1875 75.875 \nz\n\" id=\"DejaVuSans-40\"/>\n      <path d=\"M 8.015625 75.875 \nL 15.828125 75.875 \nQ 23.140625 64.359375 26.78125 53.3125 \nQ 30.421875 42.28125 30.421875 31.390625 \nQ 30.421875 20.453125 26.78125 9.375 \nQ 23.140625 -1.703125 15.828125 -13.1875 \nL 8.015625 -13.1875 \nQ 14.5 -2 17.703125 9.0625 \nQ 20.90625 20.125 20.90625 31.390625 \nQ 20.90625 42.671875 17.703125 53.65625 \nQ 14.5 64.65625 8.015625 75.875 \nz\n\" id=\"DejaVuSans-41\"/>\n     </defs>\n     <g transform=\"translate(14.798437 86.750235)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-102\"/>\n      <use x=\"35.205078\" xlink:href=\"#DejaVuSans-40\"/>\n      <use x=\"74.21875\" xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"133.398438\" xlink:href=\"#DejaVuSans-41\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_11\">\n    <path clip-path=\"url(#pbe8294e373)\" d=\"M 62.205398 16.356414 \nL 66.793331 28.796523 \nL 71.237891 40.218512 \nL 75.539078 50.682321 \nL 79.840266 60.566067 \nL 83.99808 69.568974 \nL 88.012522 77.747114 \nL 92.026963 85.419956 \nL 95.898032 92.340217 \nL 99.625727 98.560102 \nL 103.353423 104.344296 \nL 106.937746 109.495143 \nL 110.378696 114.060984 \nL 113.819646 118.255584 \nL 117.117222 121.92705 \nL 120.271427 125.119853 \nL 123.425631 128.000711 \nL 126.436462 130.459624 \nL 129.447293 132.634306 \nL 132.314751 134.441182 \nL 135.182209 135.990252 \nL 138.049667 137.281517 \nL 140.773753 138.269426 \nL 143.497838 139.024667 \nL 146.221923 139.547237 \nL 148.946009 139.837139 \nL 151.670094 139.894371 \nL 154.394179 139.718934 \nL 157.118265 139.310828 \nL 159.84235 138.670052 \nL 162.566435 137.796607 \nL 165.29052 136.690493 \nL 168.014606 135.35171 \nL 170.882064 133.691104 \nL 173.749522 131.772692 \nL 176.760353 129.480897 \nL 179.771184 126.904872 \nL 182.925388 123.901324 \nL 186.079593 120.585832 \nL 189.377169 116.7861 \nL 192.674746 112.64542 \nL 196.115696 107.961205 \nL 199.556646 102.905751 \nL 203.140969 97.244888 \nL 206.868665 90.930279 \nL 210.59636 84.179978 \nL 214.467429 76.708901 \nL 218.48187 68.464843 \nL 222.496312 59.715486 \nL 226.654126 50.120962 \nL 230.955314 39.625198 \nL 235.399874 28.170187 \nL 239.701061 16.494964 \nL 239.701061 16.494964 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"line2d_12\">\n    <path clip-path=\"url(#pbe8294e373)\" d=\"M 165.315416 136.679311 \nL 133.773376 135.261382 \nL 171.623824 133.219564 \nL 126.203286 130.279346 \nL 180.707932 126.045432 \nL 115.302357 119.948596 \nL 193.789047 111.169151 \nL 99.605019 98.526752 \nL 212.625852 80.321696 \nL 77.000852 54.106416 \nL 239.750852 16.356414 \n\" style=\"fill:none;stroke:#ff7f0e;stroke-linecap:square;stroke-width:1.5;\"/>\n    <defs>\n     <path d=\"M 0 3 \nC 0.795609 3 1.55874 2.683901 2.12132 2.12132 \nC 2.683901 1.55874 3 0.795609 3 0 \nC 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \nC 1.55874 -2.683901 0.795609 -3 0 -3 \nC -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \nC -2.683901 -1.55874 -3 -0.795609 -3 0 \nC -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \nC -1.55874 2.683901 -0.795609 3 0 3 \nz\n\" id=\"m630f08d0a7\" style=\"stroke:#ff7f0e;\"/>\n    </defs>\n    <g clip-path=\"url(#pbe8294e373)\">\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"165.315416\" xlink:href=\"#m630f08d0a7\" y=\"136.679311\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"133.773376\" xlink:href=\"#m630f08d0a7\" y=\"135.261382\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"171.623824\" xlink:href=\"#m630f08d0a7\" y=\"133.219564\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"126.203286\" xlink:href=\"#m630f08d0a7\" y=\"130.279346\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"180.707932\" xlink:href=\"#m630f08d0a7\" y=\"126.045432\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"115.302357\" xlink:href=\"#m630f08d0a7\" y=\"119.948596\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"193.789047\" xlink:href=\"#m630f08d0a7\" y=\"111.169151\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"99.605019\" xlink:href=\"#m630f08d0a7\" y=\"98.526752\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"212.625852\" xlink:href=\"#m630f08d0a7\" y=\"80.321696\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"77.000852\" xlink:href=\"#m630f08d0a7\" y=\"54.106416\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"239.750852\" xlink:href=\"#m630f08d0a7\" y=\"16.356414\"/>\n    </g>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 53.328125 146.079141 \nL 53.328125 10.179141 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 248.628125 146.079141 \nL 248.628125 10.179141 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 53.328125 146.079141 \nL 248.628125 146.079141 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 53.328125 10.179141 \nL 248.628125 10.179141 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"pbe8294e373\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"53.328125\" y=\"10.179141\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "q-NI5k9lP7h_",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "def train_2d(trainer):\n",
        "    x1, x2, s1, s2 = -5, -2, 0, 0 \n",
        "    results = [(x1, x2)]\n",
        "    for i in range(20):\n",
        "        x1, x2, s1, s2 = trainer(x1, x2, s1, s2)\n",
        "        results.append((x1, x2))\n",
        "    print('epoch %d, x1 %f, x2 %f' % (i + 1, x1, x2))\n",
        "    return results \n",
        "\n",
        "def show_trace_2d(f, results):\n",
        "    d2l.plt.plot(*zip(*results), '-o', color='#ff7f0e')\n",
        "    x1, x2 = np.meshgrid(np.arange(-5.5, 1.0, 0.1), np.arange(-3.0, 1.0, 0.1))\n",
        "    d2l.plt.contour(x1, x2, f(x1, x2), colors='#1f77b4')\n",
        "    d2l.plt.xlabel('x1')\n",
        "    d2l.plt.ylabel('x2')\n"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "VDpLokQSVCv7",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "41b1aabb-c94a-41a3-c65c-e5e02665c5f6"
      },
      "source": [
        "eta = 0.1 \n",
        "\n",
        "def f_2d(x1, x2):\n",
        "    return x1 ** 2 + 2 * x2 ** 2 \n",
        "\n",
        "def gd_2d(x1, x2, s1, s2):\n",
        "    return (x1 - eta * 2 * x1, x2 - eta * 4 * x2, 0, 0)\n",
        "\n",
        "show_trace_2d(f_2d, train_2d(gd_2d))"
      ],
      "execution_count": 13,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "epoch 20, x1 -0.057646, x2 -0.000073\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 245.120313 180.65625\" width=\"245.120313pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 245.120313 180.65625 \nL 245.120313 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 42.620312 143.1 \nL 237.920313 143.1 \nL 237.920313 7.2 \nL 42.620312 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"mf4f51b38b3\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"88.39375\" xlink:href=\"#mf4f51b38b3\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- −4 -->\n      <defs>\n       <path d=\"M 10.59375 35.5 \nL 73.1875 35.5 \nL 73.1875 27.203125 \nL 10.59375 27.203125 \nz\n\" id=\"DejaVuSans-8722\"/>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(81.022656 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-52\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"149.425\" xlink:href=\"#mf4f51b38b3\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- −2 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(142.053906 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"210.45625\" xlink:href=\"#mf4f51b38b3\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n      </defs>\n      <g transform=\"translate(207.275 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_4\">\n     <!-- x1 -->\n     <defs>\n      <path d=\"M 54.890625 54.6875 \nL 35.109375 28.078125 \nL 55.90625 0 \nL 45.3125 0 \nL 29.390625 21.484375 \nL 13.484375 0 \nL 2.875 0 \nL 24.125 28.609375 \nL 4.6875 54.6875 \nL 15.28125 54.6875 \nL 29.78125 35.203125 \nL 44.28125 54.6875 \nz\n\" id=\"DejaVuSans-120\"/>\n      <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n     </defs>\n     <g transform=\"translate(134.129687 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-49\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_4\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m97543d75a0\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m97543d75a0\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- −3 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 146.899219)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-51\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m97543d75a0\" y=\"108.253846\"/>\n      </g>\n     </g>\n     <g id=\"text_6\">\n      <!-- −2 -->\n      <g transform=\"translate(20.878125 112.053065)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_6\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m97543d75a0\" y=\"73.407692\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- −1 -->\n      <g transform=\"translate(20.878125 77.206911)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-49\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m97543d75a0\" y=\"38.561538\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0 -->\n      <g transform=\"translate(29.257812 42.360757)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_9\">\n     <!-- x2 -->\n     <g transform=\"translate(14.798437 81.290625)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-50\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"LineCollection_1\"/>\n   <g id=\"LineCollection_2\">\n    <path clip-path=\"url(#p684b5d3a3c)\" d=\"M 237.920313 104.627963 \nL 237.381801 104.769231 \nL 234.86875 105.394675 \nL 231.817188 106.064793 \nL 228.765625 106.645562 \nL 225.714063 107.136982 \nL 222.6625 107.539053 \nL 219.610938 107.851775 \nL 216.559375 108.075148 \nL 213.507813 108.209172 \nL 210.45625 108.253846 \nL 210.45625 108.253846 \nL 210.45625 108.253846 \nL 207.404688 108.209172 \nL 204.353125 108.075148 \nL 201.301563 107.851775 \nL 198.25 107.539053 \nL 195.198438 107.136982 \nL 192.146875 106.645562 \nL 189.095313 106.064793 \nL 186.04375 105.394675 \nL 183.530699 104.769231 \nL 182.992188 104.627963 \nL 179.940625 103.733264 \nL 176.889063 102.744387 \nL 173.8375 101.661331 \nL 172.861 101.284615 \nL 170.785938 100.438352 \nL 167.734375 99.094286 \nL 164.998491 97.8 \nL 164.682813 97.641608 \nL 161.63125 96.004895 \nL 158.672159 94.315385 \nL 158.579688 94.259181 \nL 155.528125 92.29206 \nL 153.383784 90.830769 \nL 152.476563 90.169894 \nL 149.425 87.82679 \nL 148.829573 87.346154 \nL 146.373438 85.216667 \nL 144.88314 83.861538 \nL 143.321875 82.328308 \nL 141.423125 80.376923 \nL 140.270313 79.08913 \nL 138.387434 76.892308 \nL 137.21875 75.398901 \nL 135.724107 73.407692 \nL 134.167188 71.115182 \nL 133.389338 69.923077 \nL 131.354963 66.438462 \nL 131.115625 65.973846 \nL 129.618632 62.953846 \nL 128.121639 59.469231 \nL 128.064063 59.310839 \nL 126.89892 55.984615 \nL 125.900227 52.5 \nL 125.123466 49.015385 \nL 125.0125 48.318462 \nL 124.584211 45.530769 \nL 124.262993 42.046154 \nL 124.155921 38.561538 \nL 124.262993 35.076923 \nL 124.584211 31.592308 \nL 125.0125 28.804615 \nL 125.123466 28.107692 \nL 125.900227 24.623077 \nL 126.89892 21.138462 \nL 128.064063 17.812238 \nL 128.121639 17.653846 \nL 129.618632 14.169231 \nL 131.115625 11.149231 \nL 131.354963 10.684615 \nL 133.389338 7.2 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_3\">\n    <path clip-path=\"url(#p684b5d3a3c)\" d=\"M 237.920313 134.578531 \nL 234.86875 135.117063 \nL 231.817188 135.592238 \nL 228.765625 136.004056 \nL 227.655966 136.130769 \nL 225.714063 136.344737 \nL 222.6625 136.619838 \nL 219.610938 136.833806 \nL 216.559375 136.98664 \nL 213.507813 137.07834 \nL 210.45625 137.108907 \nL 207.404688 137.07834 \nL 204.353125 136.98664 \nL 201.301563 136.833806 \nL 198.25 136.619838 \nL 195.198438 136.344737 \nL 193.256534 136.130769 \nL 192.146875 136.004056 \nL 189.095313 135.592238 \nL 186.04375 135.117063 \nL 182.992188 134.578531 \nL 179.940625 133.976643 \nL 176.889063 133.311399 \nL 174.102853 132.646154 \nL 173.8375 132.580406 \nL 170.785938 131.758563 \nL 167.734375 130.870972 \nL 164.682813 129.917634 \nL 162.41875 129.161538 \nL 161.63125 128.888235 \nL 158.579688 127.76086 \nL 155.528125 126.565158 \nL 153.383784 125.676923 \nL 152.476563 125.285793 \nL 149.425 123.899058 \nL 146.373438 122.441209 \nL 145.876672 122.192308 \nL 143.321875 120.857774 \nL 140.270313 119.189607 \nL 139.426263 118.707692 \nL 137.21875 117.391282 \nL 134.167188 115.494103 \nL 133.748346 115.223077 \nL 131.115625 113.44025 \nL 128.697406 111.738462 \nL 128.064063 111.271013 \nL 125.0125 108.933771 \nL 124.155921 108.253846 \nL 121.960938 106.422189 \nL 120.047246 104.769231 \nL 118.909375 103.733264 \nL 116.308043 101.284615 \nL 115.857813 100.836593 \nL 112.903125 97.8 \nL 112.80625 97.694406 \nL 109.801635 94.315385 \nL 109.754688 94.259181 \nL 106.976399 90.830769 \nL 106.703125 90.470292 \nL 104.403397 87.346154 \nL 103.651563 86.249145 \nL 102.061312 83.861538 \nL 100.6 81.492 \nL 99.931164 80.376923 \nL 98.008262 76.892308 \nL 97.548438 75.97967 \nL 96.287125 73.407692 \nL 94.741 69.923077 \nL 94.496875 69.308145 \nL 93.387216 66.438462 \nL 92.198295 62.953846 \nL 91.445313 60.407396 \nL 91.174921 59.469231 \nL 90.325119 55.984615 \nL 89.629826 52.5 \nL 89.089043 49.015385 \nL 88.702769 45.530769 \nL 88.471005 42.046154 \nL 88.39375 38.561538 \nL 88.471005 35.076923 \nL 88.702769 31.592308 \nL 89.089043 28.107692 \nL 89.629826 24.623077 \nL 90.325119 21.138462 \nL 91.174921 17.653846 \nL 91.445313 16.71568 \nL 92.198295 14.169231 \nL 93.387216 10.684615 \nL 94.496875 7.814932 \nL 94.741 7.2 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_4\">\n    <path clip-path=\"url(#p684b5d3a3c)\" d=\"M 135.724107 143.1 \nL 134.167188 142.361734 \nL 131.115625 140.855671 \nL 128.697406 139.615385 \nL 128.064063 139.27915 \nL 125.0125 137.597976 \nL 122.442763 136.130769 \nL 121.960938 135.845664 \nL 118.909375 133.976643 \nL 116.808299 132.646154 \nL 115.857813 132.021553 \nL 112.80625 129.950508 \nL 111.679519 129.161538 \nL 109.754688 127.76086 \nL 106.976399 125.676923 \nL 106.703125 125.463579 \nL 103.651563 123.010126 \nL 102.663028 122.192308 \nL 100.6 120.41293 \nL 98.677098 118.707692 \nL 97.548438 117.662308 \nL 94.985125 115.223077 \nL 94.496875 114.736852 \nL 91.564205 111.738462 \nL 91.445313 111.610976 \nL 88.39375 108.253846 \nL 88.39375 108.253846 \nL 85.455208 104.769231 \nL 85.342188 104.627963 \nL 82.731815 101.284615 \nL 82.290625 100.687253 \nL 80.208382 97.8 \nL 79.239063 96.374476 \nL 77.871121 94.315385 \nL 76.1875 91.617618 \nL 75.707479 90.830769 \nL 73.71882 87.346154 \nL 73.135938 86.249145 \nL 71.895192 83.861538 \nL 70.21851 80.376923 \nL 70.084375 80.073913 \nL 68.70625 76.892308 \nL 67.328125 73.407692 \nL 67.032813 72.582389 \nL 66.101283 69.923077 \nL 65.009145 66.438462 \nL 64.045493 62.953846 \nL 63.98125 62.685799 \nL 63.226224 59.469231 \nL 62.534117 55.984615 \nL 61.967848 52.5 \nL 61.527416 49.015385 \nL 61.212822 45.530769 \nL 61.024066 42.046154 \nL 60.961147 38.561538 \nL 61.024066 35.076923 \nL 61.212822 31.592308 \nL 61.527416 28.107692 \nL 61.967848 24.623077 \nL 62.534117 21.138462 \nL 63.226224 17.653846 \nL 63.98125 14.437278 \nL 64.045493 14.169231 \nL 65.009145 10.684615 \nL 66.101283 7.2 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_5\">\n    <path clip-path=\"url(#p684b5d3a3c)\" d=\"M 96.287125 143.1 \nL 94.496875 141.800652 \nL 91.564205 139.615385 \nL 91.445313 139.523684 \nL 88.39375 137.108907 \nL 87.188194 136.130769 \nL 85.342188 134.578531 \nL 83.099473 132.646154 \nL 82.290625 131.922932 \nL 79.274963 129.161538 \nL 79.239063 129.127376 \nL 76.1875 126.155204 \nL 75.707479 125.676923 \nL 73.135938 123.010126 \nL 72.364663 122.192308 \nL 70.084375 119.671522 \nL 69.23125 118.707692 \nL 67.032813 116.11359 \nL 66.294013 115.223077 \nL 63.98125 112.305725 \nL 63.540818 111.738462 \nL 60.961147 108.253846 \nL 60.929688 108.209172 \nL 58.55625 104.769231 \nL 57.878125 103.733264 \nL 56.307024 101.284615 \nL 54.826563 98.845385 \nL 54.204399 97.8 \nL 52.249029 94.315385 \nL 51.775 93.416129 \nL 50.438125 90.830769 \nL 48.7525 87.346154 \nL 48.723438 87.281624 \nL 47.211916 83.861538 \nL 45.785952 80.376923 \nL 45.671875 80.073913 \nL 44.496044 76.892308 \nL 43.320212 73.407692 \nL 42.620313 71.115182 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_6\">\n    <path clip-path=\"url(#p684b5d3a3c)\" d=\"M 67.328125 143.1 \nL 67.032813 142.834224 \nL 63.98125 140.028814 \nL 63.540818 139.615385 \nL 60.929688 137.07834 \nL 59.974148 136.130769 \nL 57.878125 133.976643 \nL 56.609158 132.646154 \nL 54.826563 130.706604 \nL 53.434102 129.161538 \nL 51.775 127.248416 \nL 50.438125 125.676923 \nL 48.723438 123.579042 \nL 47.611186 122.192308 \nL 45.671875 119.671522 \nL 44.943979 118.707692 \nL 42.620313 115.494103 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_7\">\n    <path clip-path=\"url(#p684b5d3a3c)\" d=\"M 43.320212 143.1 \nL 42.620313 142.361734 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_8\"/>\n   <g id=\"line2d_8\">\n    <path clip-path=\"url(#p684b5d3a3c)\" d=\"M 57.878125 108.253846 \nL 88.39375 80.376923 \nL 112.80625 63.650769 \nL 132.33625 53.615077 \nL 147.96025 47.593662 \nL 160.45945 43.980812 \nL 170.45881 41.813103 \nL 178.458298 40.512477 \nL 184.857888 39.732102 \nL 189.977561 39.263876 \nL 194.073299 38.982941 \nL 197.349889 38.81438 \nL 199.971161 38.713243 \nL 202.068179 38.652561 \nL 203.745793 38.616152 \nL 205.087884 38.594307 \nL 206.161558 38.581199 \nL 207.020496 38.573335 \nL 207.707647 38.568616 \nL 208.257367 38.565785 \nL 208.697144 38.564087 \n\" style=\"fill:none;stroke:#ff7f0e;stroke-linecap:square;stroke-width:1.5;\"/>\n    <defs>\n     <path d=\"M 0 3 \nC 0.795609 3 1.55874 2.683901 2.12132 2.12132 \nC 2.683901 1.55874 3 0.795609 3 0 \nC 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \nC 1.55874 -2.683901 0.795609 -3 0 -3 \nC -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \nC -2.683901 -1.55874 -3 -0.795609 -3 0 \nC -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \nC -1.55874 2.683901 -0.795609 3 0 3 \nz\n\" id=\"m2a55eea79d\" style=\"stroke:#ff7f0e;\"/>\n    </defs>\n    <g clip-path=\"url(#p684b5d3a3c)\">\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"57.878125\" xlink:href=\"#m2a55eea79d\" y=\"108.253846\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"88.39375\" xlink:href=\"#m2a55eea79d\" y=\"80.376923\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"112.80625\" xlink:href=\"#m2a55eea79d\" y=\"63.650769\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"132.33625\" xlink:href=\"#m2a55eea79d\" y=\"53.615077\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"147.96025\" xlink:href=\"#m2a55eea79d\" y=\"47.593662\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"160.45945\" xlink:href=\"#m2a55eea79d\" y=\"43.980812\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"170.45881\" xlink:href=\"#m2a55eea79d\" y=\"41.813103\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"178.458298\" xlink:href=\"#m2a55eea79d\" y=\"40.512477\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"184.857888\" xlink:href=\"#m2a55eea79d\" y=\"39.732102\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"189.977561\" xlink:href=\"#m2a55eea79d\" y=\"39.263876\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"194.073299\" xlink:href=\"#m2a55eea79d\" y=\"38.982941\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"197.349889\" xlink:href=\"#m2a55eea79d\" y=\"38.81438\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"199.971161\" xlink:href=\"#m2a55eea79d\" y=\"38.713243\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"202.068179\" xlink:href=\"#m2a55eea79d\" y=\"38.652561\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"203.745793\" xlink:href=\"#m2a55eea79d\" y=\"38.616152\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"205.087884\" xlink:href=\"#m2a55eea79d\" y=\"38.594307\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"206.161558\" xlink:href=\"#m2a55eea79d\" y=\"38.581199\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"207.020496\" xlink:href=\"#m2a55eea79d\" y=\"38.573335\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"207.707647\" xlink:href=\"#m2a55eea79d\" y=\"38.568616\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"208.257367\" xlink:href=\"#m2a55eea79d\" y=\"38.565785\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"208.697144\" xlink:href=\"#m2a55eea79d\" y=\"38.564087\"/>\n    </g>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 42.620312 143.1 \nL 42.620312 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 237.920313 143.1 \nL 237.920313 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 42.620313 143.1 \nL 237.920313 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 42.620313 7.2 \nL 237.920313 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p684b5d3a3c\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"42.620312\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "N91rk_17Vnkj",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "fa831fff-daba-4485-bca9-12a670270df4"
      },
      "source": [
        "def sgd_2d(x1, x2, s1, s2):\n",
        "    return (x1 - eta * (2 * x1 + np.random.normal(0.1)), \n",
        "        x2 - eta * (4 * x2 + np.random.normal(0.1)), 0, 0)\n",
        "\n",
        "show_trace_2d(f_2d, train_2d(sgd_2d))"
      ],
      "execution_count": 14,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "epoch 20, x1 -0.218025, x2 0.056565\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 245.120313 180.65625\" width=\"245.120313pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 245.120313 180.65625 \nL 245.120313 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 42.620312 143.1 \nL 237.920313 143.1 \nL 237.920313 7.2 \nL 42.620312 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m28a10443a9\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"88.39375\" xlink:href=\"#m28a10443a9\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- −4 -->\n      <defs>\n       <path d=\"M 10.59375 35.5 \nL 73.1875 35.5 \nL 73.1875 27.203125 \nL 10.59375 27.203125 \nz\n\" id=\"DejaVuSans-8722\"/>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(81.022656 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-52\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"149.425\" xlink:href=\"#m28a10443a9\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- −2 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(142.053906 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"210.45625\" xlink:href=\"#m28a10443a9\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n      </defs>\n      <g transform=\"translate(207.275 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_4\">\n     <!-- x1 -->\n     <defs>\n      <path d=\"M 54.890625 54.6875 \nL 35.109375 28.078125 \nL 55.90625 0 \nL 45.3125 0 \nL 29.390625 21.484375 \nL 13.484375 0 \nL 2.875 0 \nL 24.125 28.609375 \nL 4.6875 54.6875 \nL 15.28125 54.6875 \nL 29.78125 35.203125 \nL 44.28125 54.6875 \nz\n\" id=\"DejaVuSans-120\"/>\n      <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n     </defs>\n     <g transform=\"translate(134.129687 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-49\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_4\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"mb39e53a884\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#mb39e53a884\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- −3 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 146.899219)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-51\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#mb39e53a884\" y=\"108.253846\"/>\n      </g>\n     </g>\n     <g id=\"text_6\">\n      <!-- −2 -->\n      <g transform=\"translate(20.878125 112.053065)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_6\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#mb39e53a884\" y=\"73.407692\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- −1 -->\n      <g transform=\"translate(20.878125 77.206911)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-49\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#mb39e53a884\" y=\"38.561538\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0 -->\n      <g transform=\"translate(29.257812 42.360757)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_9\">\n     <!-- x2 -->\n     <g transform=\"translate(14.798437 81.290625)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-50\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"LineCollection_1\"/>\n   <g id=\"LineCollection_2\">\n    <path clip-path=\"url(#p11e86ea99b)\" d=\"M 237.920313 104.627963 \nL 237.381801 104.769231 \nL 234.86875 105.394675 \nL 231.817188 106.064793 \nL 228.765625 106.645562 \nL 225.714063 107.136982 \nL 222.6625 107.539053 \nL 219.610938 107.851775 \nL 216.559375 108.075148 \nL 213.507813 108.209172 \nL 210.45625 108.253846 \nL 210.45625 108.253846 \nL 210.45625 108.253846 \nL 207.404688 108.209172 \nL 204.353125 108.075148 \nL 201.301563 107.851775 \nL 198.25 107.539053 \nL 195.198438 107.136982 \nL 192.146875 106.645562 \nL 189.095313 106.064793 \nL 186.04375 105.394675 \nL 183.530699 104.769231 \nL 182.992188 104.627963 \nL 179.940625 103.733264 \nL 176.889063 102.744387 \nL 173.8375 101.661331 \nL 172.861 101.284615 \nL 170.785938 100.438352 \nL 167.734375 99.094286 \nL 164.998491 97.8 \nL 164.682813 97.641608 \nL 161.63125 96.004895 \nL 158.672159 94.315385 \nL 158.579688 94.259181 \nL 155.528125 92.29206 \nL 153.383784 90.830769 \nL 152.476563 90.169894 \nL 149.425 87.82679 \nL 148.829573 87.346154 \nL 146.373438 85.216667 \nL 144.88314 83.861538 \nL 143.321875 82.328308 \nL 141.423125 80.376923 \nL 140.270313 79.08913 \nL 138.387434 76.892308 \nL 137.21875 75.398901 \nL 135.724107 73.407692 \nL 134.167188 71.115182 \nL 133.389338 69.923077 \nL 131.354963 66.438462 \nL 131.115625 65.973846 \nL 129.618632 62.953846 \nL 128.121639 59.469231 \nL 128.064063 59.310839 \nL 126.89892 55.984615 \nL 125.900227 52.5 \nL 125.123466 49.015385 \nL 125.0125 48.318462 \nL 124.584211 45.530769 \nL 124.262993 42.046154 \nL 124.155921 38.561538 \nL 124.262993 35.076923 \nL 124.584211 31.592308 \nL 125.0125 28.804615 \nL 125.123466 28.107692 \nL 125.900227 24.623077 \nL 126.89892 21.138462 \nL 128.064063 17.812238 \nL 128.121639 17.653846 \nL 129.618632 14.169231 \nL 131.115625 11.149231 \nL 131.354963 10.684615 \nL 133.389338 7.2 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_3\">\n    <path clip-path=\"url(#p11e86ea99b)\" d=\"M 237.920313 134.578531 \nL 234.86875 135.117063 \nL 231.817188 135.592238 \nL 228.765625 136.004056 \nL 227.655966 136.130769 \nL 225.714063 136.344737 \nL 222.6625 136.619838 \nL 219.610938 136.833806 \nL 216.559375 136.98664 \nL 213.507813 137.07834 \nL 210.45625 137.108907 \nL 207.404688 137.07834 \nL 204.353125 136.98664 \nL 201.301563 136.833806 \nL 198.25 136.619838 \nL 195.198438 136.344737 \nL 193.256534 136.130769 \nL 192.146875 136.004056 \nL 189.095313 135.592238 \nL 186.04375 135.117063 \nL 182.992188 134.578531 \nL 179.940625 133.976643 \nL 176.889063 133.311399 \nL 174.102853 132.646154 \nL 173.8375 132.580406 \nL 170.785938 131.758563 \nL 167.734375 130.870972 \nL 164.682813 129.917634 \nL 162.41875 129.161538 \nL 161.63125 128.888235 \nL 158.579688 127.76086 \nL 155.528125 126.565158 \nL 153.383784 125.676923 \nL 152.476563 125.285793 \nL 149.425 123.899058 \nL 146.373438 122.441209 \nL 145.876672 122.192308 \nL 143.321875 120.857774 \nL 140.270313 119.189607 \nL 139.426263 118.707692 \nL 137.21875 117.391282 \nL 134.167188 115.494103 \nL 133.748346 115.223077 \nL 131.115625 113.44025 \nL 128.697406 111.738462 \nL 128.064063 111.271013 \nL 125.0125 108.933771 \nL 124.155921 108.253846 \nL 121.960938 106.422189 \nL 120.047246 104.769231 \nL 118.909375 103.733264 \nL 116.308043 101.284615 \nL 115.857813 100.836593 \nL 112.903125 97.8 \nL 112.80625 97.694406 \nL 109.801635 94.315385 \nL 109.754688 94.259181 \nL 106.976399 90.830769 \nL 106.703125 90.470292 \nL 104.403397 87.346154 \nL 103.651563 86.249145 \nL 102.061312 83.861538 \nL 100.6 81.492 \nL 99.931164 80.376923 \nL 98.008262 76.892308 \nL 97.548438 75.97967 \nL 96.287125 73.407692 \nL 94.741 69.923077 \nL 94.496875 69.308145 \nL 93.387216 66.438462 \nL 92.198295 62.953846 \nL 91.445313 60.407396 \nL 91.174921 59.469231 \nL 90.325119 55.984615 \nL 89.629826 52.5 \nL 89.089043 49.015385 \nL 88.702769 45.530769 \nL 88.471005 42.046154 \nL 88.39375 38.561538 \nL 88.471005 35.076923 \nL 88.702769 31.592308 \nL 89.089043 28.107692 \nL 89.629826 24.623077 \nL 90.325119 21.138462 \nL 91.174921 17.653846 \nL 91.445313 16.71568 \nL 92.198295 14.169231 \nL 93.387216 10.684615 \nL 94.496875 7.814932 \nL 94.741 7.2 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_4\">\n    <path clip-path=\"url(#p11e86ea99b)\" d=\"M 135.724107 143.1 \nL 134.167188 142.361734 \nL 131.115625 140.855671 \nL 128.697406 139.615385 \nL 128.064063 139.27915 \nL 125.0125 137.597976 \nL 122.442763 136.130769 \nL 121.960938 135.845664 \nL 118.909375 133.976643 \nL 116.808299 132.646154 \nL 115.857813 132.021553 \nL 112.80625 129.950508 \nL 111.679519 129.161538 \nL 109.754688 127.76086 \nL 106.976399 125.676923 \nL 106.703125 125.463579 \nL 103.651563 123.010126 \nL 102.663028 122.192308 \nL 100.6 120.41293 \nL 98.677098 118.707692 \nL 97.548438 117.662308 \nL 94.985125 115.223077 \nL 94.496875 114.736852 \nL 91.564205 111.738462 \nL 91.445313 111.610976 \nL 88.39375 108.253846 \nL 88.39375 108.253846 \nL 85.455208 104.769231 \nL 85.342188 104.627963 \nL 82.731815 101.284615 \nL 82.290625 100.687253 \nL 80.208382 97.8 \nL 79.239063 96.374476 \nL 77.871121 94.315385 \nL 76.1875 91.617618 \nL 75.707479 90.830769 \nL 73.71882 87.346154 \nL 73.135938 86.249145 \nL 71.895192 83.861538 \nL 70.21851 80.376923 \nL 70.084375 80.073913 \nL 68.70625 76.892308 \nL 67.328125 73.407692 \nL 67.032813 72.582389 \nL 66.101283 69.923077 \nL 65.009145 66.438462 \nL 64.045493 62.953846 \nL 63.98125 62.685799 \nL 63.226224 59.469231 \nL 62.534117 55.984615 \nL 61.967848 52.5 \nL 61.527416 49.015385 \nL 61.212822 45.530769 \nL 61.024066 42.046154 \nL 60.961147 38.561538 \nL 61.024066 35.076923 \nL 61.212822 31.592308 \nL 61.527416 28.107692 \nL 61.967848 24.623077 \nL 62.534117 21.138462 \nL 63.226224 17.653846 \nL 63.98125 14.437278 \nL 64.045493 14.169231 \nL 65.009145 10.684615 \nL 66.101283 7.2 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_5\">\n    <path clip-path=\"url(#p11e86ea99b)\" d=\"M 96.287125 143.1 \nL 94.496875 141.800652 \nL 91.564205 139.615385 \nL 91.445313 139.523684 \nL 88.39375 137.108907 \nL 87.188194 136.130769 \nL 85.342188 134.578531 \nL 83.099473 132.646154 \nL 82.290625 131.922932 \nL 79.274963 129.161538 \nL 79.239063 129.127376 \nL 76.1875 126.155204 \nL 75.707479 125.676923 \nL 73.135938 123.010126 \nL 72.364663 122.192308 \nL 70.084375 119.671522 \nL 69.23125 118.707692 \nL 67.032813 116.11359 \nL 66.294013 115.223077 \nL 63.98125 112.305725 \nL 63.540818 111.738462 \nL 60.961147 108.253846 \nL 60.929688 108.209172 \nL 58.55625 104.769231 \nL 57.878125 103.733264 \nL 56.307024 101.284615 \nL 54.826563 98.845385 \nL 54.204399 97.8 \nL 52.249029 94.315385 \nL 51.775 93.416129 \nL 50.438125 90.830769 \nL 48.7525 87.346154 \nL 48.723438 87.281624 \nL 47.211916 83.861538 \nL 45.785952 80.376923 \nL 45.671875 80.073913 \nL 44.496044 76.892308 \nL 43.320212 73.407692 \nL 42.620313 71.115182 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_6\">\n    <path clip-path=\"url(#p11e86ea99b)\" d=\"M 67.328125 143.1 \nL 67.032813 142.834224 \nL 63.98125 140.028814 \nL 63.540818 139.615385 \nL 60.929688 137.07834 \nL 59.974148 136.130769 \nL 57.878125 133.976643 \nL 56.609158 132.646154 \nL 54.826563 130.706604 \nL 53.434102 129.161538 \nL 51.775 127.248416 \nL 50.438125 125.676923 \nL 48.723438 123.579042 \nL 47.611186 122.192308 \nL 45.671875 119.671522 \nL 44.943979 118.707692 \nL 42.620313 115.494103 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_7\">\n    <path clip-path=\"url(#p11e86ea99b)\" d=\"M 43.320212 143.1 \nL 42.620313 142.361734 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_8\"/>\n   <g id=\"line2d_8\">\n    <path clip-path=\"url(#p11e86ea99b)\" d=\"M 57.878125 108.253846 \nL 89.73755 76.860419 \nL 115.559295 58.662215 \nL 135.8977 53.53716 \nL 155.976538 49.972995 \nL 167.33395 44.902365 \nL 180.963781 44.992273 \nL 187.153142 41.76573 \nL 190.456318 42.963105 \nL 193.016039 37.129775 \nL 193.714938 40.525279 \nL 199.21649 39.267866 \nL 202.533159 40.150596 \nL 200.694793 36.47284 \nL 201.641588 40.991834 \nL 205.663517 38.285134 \nL 205.091096 30.446318 \nL 202.075632 33.065337 \nL 204.555191 38.226623 \nL 202.649096 38.240961 \nL 203.803072 36.590454 \n\" style=\"fill:none;stroke:#ff7f0e;stroke-linecap:square;stroke-width:1.5;\"/>\n    <defs>\n     <path d=\"M 0 3 \nC 0.795609 3 1.55874 2.683901 2.12132 2.12132 \nC 2.683901 1.55874 3 0.795609 3 0 \nC 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \nC 1.55874 -2.683901 0.795609 -3 0 -3 \nC -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \nC -2.683901 -1.55874 -3 -0.795609 -3 0 \nC -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \nC -1.55874 2.683901 -0.795609 3 0 3 \nz\n\" id=\"m225dcf2dfa\" style=\"stroke:#ff7f0e;\"/>\n    </defs>\n    <g clip-path=\"url(#p11e86ea99b)\">\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"57.878125\" xlink:href=\"#m225dcf2dfa\" y=\"108.253846\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"89.73755\" xlink:href=\"#m225dcf2dfa\" y=\"76.860419\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"115.559295\" xlink:href=\"#m225dcf2dfa\" y=\"58.662215\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"135.8977\" xlink:href=\"#m225dcf2dfa\" y=\"53.53716\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"155.976538\" xlink:href=\"#m225dcf2dfa\" y=\"49.972995\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"167.33395\" xlink:href=\"#m225dcf2dfa\" y=\"44.902365\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"180.963781\" xlink:href=\"#m225dcf2dfa\" y=\"44.992273\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"187.153142\" xlink:href=\"#m225dcf2dfa\" y=\"41.76573\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"190.456318\" xlink:href=\"#m225dcf2dfa\" y=\"42.963105\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"193.016039\" xlink:href=\"#m225dcf2dfa\" y=\"37.129775\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"193.714938\" xlink:href=\"#m225dcf2dfa\" y=\"40.525279\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"199.21649\" xlink:href=\"#m225dcf2dfa\" y=\"39.267866\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"202.533159\" xlink:href=\"#m225dcf2dfa\" y=\"40.150596\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"200.694793\" xlink:href=\"#m225dcf2dfa\" y=\"36.47284\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"201.641588\" xlink:href=\"#m225dcf2dfa\" y=\"40.991834\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"205.663517\" xlink:href=\"#m225dcf2dfa\" y=\"38.285134\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"205.091096\" xlink:href=\"#m225dcf2dfa\" y=\"30.446318\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"202.075632\" xlink:href=\"#m225dcf2dfa\" y=\"33.065337\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"204.555191\" xlink:href=\"#m225dcf2dfa\" y=\"38.226623\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"202.649096\" xlink:href=\"#m225dcf2dfa\" y=\"38.240961\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"203.803072\" xlink:href=\"#m225dcf2dfa\" y=\"36.590454\"/>\n    </g>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 42.620312 143.1 \nL 42.620312 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 237.920313 143.1 \nL 237.920313 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 42.620313 143.1 \nL 237.920313 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 42.620313 7.2 \nL 237.920313 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p11e86ea99b\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"42.620312\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "fIpZ4rAEYQVJ",
        "colab_type": "text"
      },
      "source": [
        "## 7.3 小批量梯度下降"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "F7UJGOiGYjza",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "%matplotlib inline \n",
        "import d2lzh as d2l \n",
        "from mxnet import autograd, gluon, init, nd \n",
        "from mxnet.gluon import nn, data as gdata, loss as gloss \n",
        "import numpy as np \n",
        "import time "
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "9eV4Ij4kat2V",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 140
        },
        "outputId": "06764f15-6fc5-458c-f70f-de0e08ecf851"
      },
      "source": [
        "!git clone https://github.com/d2l-ai/d2l-zh.git"
      ],
      "execution_count": 16,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Cloning into 'd2l-zh'...\n",
            "remote: Enumerating objects: 17, done.\u001b[K\n",
            "remote: Counting objects: 100% (17/17), done.\u001b[K\n",
            "remote: Compressing objects: 100% (13/13), done.\u001b[K\n",
            "remote: Total 15702 (delta 9), reused 8 (delta 4), pack-reused 15685\u001b[K\n",
            "Receiving objects: 100% (15702/15702), 159.56 MiB | 37.40 MiB/s, done.\n",
            "Resolving deltas: 100% (11132/11132), done.\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "Q5pG4wR3aEDF",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 70
        },
        "outputId": "d7f4bdd0-d4df-485b-9d5a-41ed3c162254"
      },
      "source": [
        "!ls d2l-zh/data/"
      ],
      "execution_count": 17,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "airfoil_self_noise.dat\tkaggle_cifar10\t\t    kaggle_house_pred_train.csv\n",
            "fr-en-small.txt\t\tkaggle_dog\t\t    ptb.zip\n",
            "jaychou_lyrics.txt.zip\tkaggle_house_pred_test.csv\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "sD12xcbHaU9C",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 34
        },
        "outputId": "6b77b5b7-96cd-4405-bcb0-1ef27fff913a"
      },
      "source": [
        "def get_data_ch7():\n",
        "    data = np.genfromtxt('./d2l-zh/data/airfoil_self_noise.dat', delimiter='\\t')\n",
        "    data = (data - data.mean(axis=0)) / data.std(axis=0)\n",
        "    return nd.array(data[:1500, :-1]), nd.array(data[:1500, -1])\n",
        "\n",
        "features, labels = get_data_ch7()\n",
        "features.shape"
      ],
      "execution_count": 18,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "(1500, 5)"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 18
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "uhOpUbxVbSfx",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "def sgd(params, states, hyperparams):\n",
        "    for p in params:\n",
        "        p[:] -= hyperparams['lr'] * p.grad "
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "gixiE5I98CiO",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "def train_ch7(trainer_fn, states, hyperparams, features, labels, batch_size=10, num_epochs=2):\n",
        "    net, loss = d2l.linreg, d2l.squared_loss \n",
        "    w = nd.random.normal(scale=0.01, shape=(features.shape[1], 1))\n",
        "    b = nd.zeros(1)\n",
        "    w.attach_grad()\n",
        "    b.attach_grad()\n",
        "\n",
        "    def eval_loss():\n",
        "        return loss(net(features, w, b), labels).mean().asscalar()\n",
        "\n",
        "    ls = [eval_loss()]\n",
        "    data_iter = gdata.DataLoader(gdata.ArrayDataset(features, labels), batch_size, shuffle=True)\n",
        "    for _ in range(num_epochs):\n",
        "        start = time.time()\n",
        "        for batch_i, (X, y) in enumerate(data_iter):\n",
        "            with autograd.record():\n",
        "                l = loss(net(X, w, b), y).mean()\n",
        "            l.backward()\n",
        "            trainer_fn([w, b], states, hyperparams)\n",
        "            if (batch_i + 1) * batch_size % 100 == 0:\n",
        "                ls.append(eval_loss())\n",
        "\n",
        "    print('loss: %f, %f sec per epoch' % (ls[-1], time.time() - start))\n",
        "    d2l.set_figsize()\n",
        "    d2l.plt.plot(np.linspace(0, num_epochs, len(ls)), ls)\n",
        "    d2l.plt.xlabel('epoch')\n",
        "    d2l.plt.ylabel('loss')"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "A9fgqYbG-biG",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "09789c62-1830-429e-a236-f91dbf4824ef"
      },
      "source": [
        "def train_sgd(lr, batch_size, num_epochs=2):\n",
        "    train_ch7(sgd, None, {'lr': lr}, features, labels, batch_size, num_epochs)\n",
        "\n",
        "train_sgd(1, 1500, 6)"
      ],
      "execution_count": 21,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "loss: 0.246095, 0.016890 sec per epoch\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 252.64375 180.65625\" width=\"252.64375pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 252.64375 180.65625 \nL 252.64375 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \nL 245.44375 7.2 \nL 50.14375 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m81f0e58a89\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"59.021023\" xlink:href=\"#m81f0e58a89\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- 0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n      </defs>\n      <g transform=\"translate(55.839773 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"118.202841\" xlink:href=\"#m81f0e58a89\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- 2 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(115.021591 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"177.384659\" xlink:href=\"#m81f0e58a89\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 4 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(174.203409 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-52\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"236.566477\" xlink:href=\"#m81f0e58a89\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 6 -->\n      <defs>\n       <path d=\"M 33.015625 40.375 \nQ 26.375 40.375 22.484375 35.828125 \nQ 18.609375 31.296875 18.609375 23.390625 \nQ 18.609375 15.53125 22.484375 10.953125 \nQ 26.375 6.390625 33.015625 6.390625 \nQ 39.65625 6.390625 43.53125 10.953125 \nQ 47.40625 15.53125 47.40625 23.390625 \nQ 47.40625 31.296875 43.53125 35.828125 \nQ 39.65625 40.375 33.015625 40.375 \nz\nM 52.59375 71.296875 \nL 52.59375 62.3125 \nQ 48.875 64.0625 45.09375 64.984375 \nQ 41.3125 65.921875 37.59375 65.921875 \nQ 27.828125 65.921875 22.671875 59.328125 \nQ 17.53125 52.734375 16.796875 39.40625 \nQ 19.671875 43.65625 24.015625 45.921875 \nQ 28.375 48.1875 33.59375 48.1875 \nQ 44.578125 48.1875 50.953125 41.515625 \nQ 57.328125 34.859375 57.328125 23.390625 \nQ 57.328125 12.15625 50.6875 5.359375 \nQ 44.046875 -1.421875 33.015625 -1.421875 \nQ 20.359375 -1.421875 13.671875 8.265625 \nQ 6.984375 17.96875 6.984375 36.375 \nQ 6.984375 53.65625 15.1875 63.9375 \nQ 23.390625 74.21875 37.203125 74.21875 \nQ 40.921875 74.21875 44.703125 73.484375 \nQ 48.484375 72.75 52.59375 71.296875 \nz\n\" id=\"DejaVuSans-54\"/>\n      </defs>\n      <g transform=\"translate(233.385227 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-54\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_5\">\n     <!-- epoch -->\n     <defs>\n      <path d=\"M 56.203125 29.59375 \nL 56.203125 25.203125 \nL 14.890625 25.203125 \nQ 15.484375 15.921875 20.484375 11.0625 \nQ 25.484375 6.203125 34.421875 6.203125 \nQ 39.59375 6.203125 44.453125 7.46875 \nQ 49.3125 8.734375 54.109375 11.28125 \nL 54.109375 2.78125 \nQ 49.265625 0.734375 44.1875 -0.34375 \nQ 39.109375 -1.421875 33.890625 -1.421875 \nQ 20.796875 -1.421875 13.15625 6.1875 \nQ 5.515625 13.8125 5.515625 26.8125 \nQ 5.515625 40.234375 12.765625 48.109375 \nQ 20.015625 56 32.328125 56 \nQ 43.359375 56 49.78125 48.890625 \nQ 56.203125 41.796875 56.203125 29.59375 \nz\nM 47.21875 32.234375 \nQ 47.125 39.59375 43.09375 43.984375 \nQ 39.0625 48.390625 32.421875 48.390625 \nQ 24.90625 48.390625 20.390625 44.140625 \nQ 15.875 39.890625 15.1875 32.171875 \nz\n\" id=\"DejaVuSans-101\"/>\n      <path d=\"M 18.109375 8.203125 \nL 18.109375 -20.796875 \nL 9.078125 -20.796875 \nL 9.078125 54.6875 \nL 18.109375 54.6875 \nL 18.109375 46.390625 \nQ 20.953125 51.265625 25.265625 53.625 \nQ 29.59375 56 35.59375 56 \nQ 45.5625 56 51.78125 48.09375 \nQ 58.015625 40.1875 58.015625 27.296875 \nQ 58.015625 14.40625 51.78125 6.484375 \nQ 45.5625 -1.421875 35.59375 -1.421875 \nQ 29.59375 -1.421875 25.265625 0.953125 \nQ 20.953125 3.328125 18.109375 8.203125 \nz\nM 48.6875 27.296875 \nQ 48.6875 37.203125 44.609375 42.84375 \nQ 40.53125 48.484375 33.40625 48.484375 \nQ 26.265625 48.484375 22.1875 42.84375 \nQ 18.109375 37.203125 18.109375 27.296875 \nQ 18.109375 17.390625 22.1875 11.75 \nQ 26.265625 6.109375 33.40625 6.109375 \nQ 40.53125 6.109375 44.609375 11.75 \nQ 48.6875 17.390625 48.6875 27.296875 \nz\n\" id=\"DejaVuSans-112\"/>\n      <path d=\"M 30.609375 48.390625 \nQ 23.390625 48.390625 19.1875 42.75 \nQ 14.984375 37.109375 14.984375 27.296875 \nQ 14.984375 17.484375 19.15625 11.84375 \nQ 23.34375 6.203125 30.609375 6.203125 \nQ 37.796875 6.203125 41.984375 11.859375 \nQ 46.1875 17.53125 46.1875 27.296875 \nQ 46.1875 37.015625 41.984375 42.703125 \nQ 37.796875 48.390625 30.609375 48.390625 \nz\nM 30.609375 56 \nQ 42.328125 56 49.015625 48.375 \nQ 55.71875 40.765625 55.71875 27.296875 \nQ 55.71875 13.875 49.015625 6.21875 \nQ 42.328125 -1.421875 30.609375 -1.421875 \nQ 18.84375 -1.421875 12.171875 6.21875 \nQ 5.515625 13.875 5.515625 27.296875 \nQ 5.515625 40.765625 12.171875 48.375 \nQ 18.84375 56 30.609375 56 \nz\n\" id=\"DejaVuSans-111\"/>\n      <path d=\"M 48.78125 52.59375 \nL 48.78125 44.1875 \nQ 44.96875 46.296875 41.140625 47.34375 \nQ 37.3125 48.390625 33.40625 48.390625 \nQ 24.65625 48.390625 19.8125 42.84375 \nQ 14.984375 37.3125 14.984375 27.296875 \nQ 14.984375 17.28125 19.8125 11.734375 \nQ 24.65625 6.203125 33.40625 6.203125 \nQ 37.3125 6.203125 41.140625 7.25 \nQ 44.96875 8.296875 48.78125 10.40625 \nL 48.78125 2.09375 \nQ 45.015625 0.34375 40.984375 -0.53125 \nQ 36.96875 -1.421875 32.421875 -1.421875 \nQ 20.0625 -1.421875 12.78125 6.34375 \nQ 5.515625 14.109375 5.515625 27.296875 \nQ 5.515625 40.671875 12.859375 48.328125 \nQ 20.21875 56 33.015625 56 \nQ 37.15625 56 41.109375 55.140625 \nQ 45.0625 54.296875 48.78125 52.59375 \nz\n\" id=\"DejaVuSans-99\"/>\n      <path d=\"M 54.890625 33.015625 \nL 54.890625 0 \nL 45.90625 0 \nL 45.90625 32.71875 \nQ 45.90625 40.484375 42.875 44.328125 \nQ 39.84375 48.1875 33.796875 48.1875 \nQ 26.515625 48.1875 22.3125 43.546875 \nQ 18.109375 38.921875 18.109375 30.90625 \nL 18.109375 0 \nL 9.078125 0 \nL 9.078125 75.984375 \nL 18.109375 75.984375 \nL 18.109375 46.1875 \nQ 21.34375 51.125 25.703125 53.5625 \nQ 30.078125 56 35.796875 56 \nQ 45.21875 56 50.046875 50.171875 \nQ 54.890625 44.34375 54.890625 33.015625 \nz\n\" id=\"DejaVuSans-104\"/>\n     </defs>\n     <g transform=\"translate(132.565625 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-101\"/>\n      <use x=\"61.523438\" xlink:href=\"#DejaVuSans-112\"/>\n      <use x=\"125\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"186.181641\" xlink:href=\"#DejaVuSans-99\"/>\n      <use x=\"241.162109\" xlink:href=\"#DejaVuSans-104\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_5\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m94da0b7b18\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m94da0b7b18\" y=\"135.038872\"/>\n      </g>\n     </g>\n     <g id=\"text_6\">\n      <!-- 0.25 -->\n      <defs>\n       <path d=\"M 10.6875 12.40625 \nL 21 12.40625 \nL 21 0 \nL 10.6875 0 \nz\n\" id=\"DejaVuSans-46\"/>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(20.878125 138.83809)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_6\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m94da0b7b18\" y=\"111.653287\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0.30 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 115.452506)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m94da0b7b18\" y=\"88.267703\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0.35 -->\n      <g transform=\"translate(20.878125 92.066921)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m94da0b7b18\" y=\"64.882118\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 0.40 -->\n      <g transform=\"translate(20.878125 68.681337)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m94da0b7b18\" y=\"41.496534\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 0.45 -->\n      <g transform=\"translate(20.878125 45.295752)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m94da0b7b18\" y=\"18.110949\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 0.50 -->\n      <g transform=\"translate(20.878125 21.910168)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_12\">\n     <!-- loss -->\n     <defs>\n      <path d=\"M 9.421875 75.984375 \nL 18.40625 75.984375 \nL 18.40625 0 \nL 9.421875 0 \nz\n\" id=\"DejaVuSans-108\"/>\n      <path d=\"M 44.28125 53.078125 \nL 44.28125 44.578125 \nQ 40.484375 46.53125 36.375 47.5 \nQ 32.28125 48.484375 27.875 48.484375 \nQ 21.1875 48.484375 17.84375 46.4375 \nQ 14.5 44.390625 14.5 40.28125 \nQ 14.5 37.15625 16.890625 35.375 \nQ 19.28125 33.59375 26.515625 31.984375 \nL 29.59375 31.296875 \nQ 39.15625 29.25 43.1875 25.515625 \nQ 47.21875 21.78125 47.21875 15.09375 \nQ 47.21875 7.46875 41.1875 3.015625 \nQ 35.15625 -1.421875 24.609375 -1.421875 \nQ 20.21875 -1.421875 15.453125 -0.5625 \nQ 10.6875 0.296875 5.421875 2 \nL 5.421875 11.28125 \nQ 10.40625 8.6875 15.234375 7.390625 \nQ 20.0625 6.109375 24.8125 6.109375 \nQ 31.15625 6.109375 34.5625 8.28125 \nQ 37.984375 10.453125 37.984375 14.40625 \nQ 37.984375 18.0625 35.515625 20.015625 \nQ 33.0625 21.96875 24.703125 23.78125 \nL 21.578125 24.515625 \nQ 13.234375 26.265625 9.515625 29.90625 \nQ 5.8125 33.546875 5.8125 39.890625 \nQ 5.8125 47.609375 11.28125 51.796875 \nQ 16.75 56 26.8125 56 \nQ 31.78125 56 36.171875 55.265625 \nQ 40.578125 54.546875 44.28125 53.078125 \nz\n\" id=\"DejaVuSans-115\"/>\n     </defs>\n     <g transform=\"translate(14.798437 84.807812)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-108\"/>\n      <use x=\"27.783203\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"88.964844\" xlink:href=\"#DejaVuSans-115\"/>\n      <use x=\"141.064453\" xlink:href=\"#DejaVuSans-115\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_11\">\n    <path clip-path=\"url(#pab5b1128d5)\" d=\"M 59.021023 13.377273 \nL 88.611932 122.04063 \nL 118.202841 134.588645 \nL 147.79375 136.403336 \nL 177.384659 136.819517 \nL 206.975568 136.922727 \nL 236.566477 136.865097 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 50.14375 143.1 \nL 50.14375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 245.44375 143.1 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 50.14375 7.2 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"pab5b1128d5\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"50.14375\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "2OdcJ7eE-t_V",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "fcba0701-2d30-426a-de23-b7256ca0412b"
      },
      "source": [
        "train_sgd(0.005, 1)"
      ],
      "execution_count": 22,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "loss: 0.244370, 1.464674 sec per epoch\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 252.64375 180.65625\" width=\"252.64375pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 252.64375 180.65625 \nL 252.64375 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \nL 245.44375 7.2 \nL 50.14375 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"mfb5c4f6776\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"59.021023\" xlink:href=\"#mfb5c4f6776\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- 0.0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n       <path d=\"M 10.6875 12.40625 \nL 21 12.40625 \nL 21 0 \nL 10.6875 0 \nz\n\" id=\"DejaVuSans-46\"/>\n      </defs>\n      <g transform=\"translate(51.06946 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"103.407386\" xlink:href=\"#mfb5c4f6776\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- 0.5 -->\n      <defs>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(95.455824 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"147.79375\" xlink:href=\"#mfb5c4f6776\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 1.0 -->\n      <defs>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n      </defs>\n      <g transform=\"translate(139.842187 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"192.180114\" xlink:href=\"#mfb5c4f6776\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 1.5 -->\n      <g transform=\"translate(184.228551 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"236.566477\" xlink:href=\"#mfb5c4f6776\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 2.0 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(228.614915 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_6\">\n     <!-- epoch -->\n     <defs>\n      <path d=\"M 56.203125 29.59375 \nL 56.203125 25.203125 \nL 14.890625 25.203125 \nQ 15.484375 15.921875 20.484375 11.0625 \nQ 25.484375 6.203125 34.421875 6.203125 \nQ 39.59375 6.203125 44.453125 7.46875 \nQ 49.3125 8.734375 54.109375 11.28125 \nL 54.109375 2.78125 \nQ 49.265625 0.734375 44.1875 -0.34375 \nQ 39.109375 -1.421875 33.890625 -1.421875 \nQ 20.796875 -1.421875 13.15625 6.1875 \nQ 5.515625 13.8125 5.515625 26.8125 \nQ 5.515625 40.234375 12.765625 48.109375 \nQ 20.015625 56 32.328125 56 \nQ 43.359375 56 49.78125 48.890625 \nQ 56.203125 41.796875 56.203125 29.59375 \nz\nM 47.21875 32.234375 \nQ 47.125 39.59375 43.09375 43.984375 \nQ 39.0625 48.390625 32.421875 48.390625 \nQ 24.90625 48.390625 20.390625 44.140625 \nQ 15.875 39.890625 15.1875 32.171875 \nz\n\" id=\"DejaVuSans-101\"/>\n      <path d=\"M 18.109375 8.203125 \nL 18.109375 -20.796875 \nL 9.078125 -20.796875 \nL 9.078125 54.6875 \nL 18.109375 54.6875 \nL 18.109375 46.390625 \nQ 20.953125 51.265625 25.265625 53.625 \nQ 29.59375 56 35.59375 56 \nQ 45.5625 56 51.78125 48.09375 \nQ 58.015625 40.1875 58.015625 27.296875 \nQ 58.015625 14.40625 51.78125 6.484375 \nQ 45.5625 -1.421875 35.59375 -1.421875 \nQ 29.59375 -1.421875 25.265625 0.953125 \nQ 20.953125 3.328125 18.109375 8.203125 \nz\nM 48.6875 27.296875 \nQ 48.6875 37.203125 44.609375 42.84375 \nQ 40.53125 48.484375 33.40625 48.484375 \nQ 26.265625 48.484375 22.1875 42.84375 \nQ 18.109375 37.203125 18.109375 27.296875 \nQ 18.109375 17.390625 22.1875 11.75 \nQ 26.265625 6.109375 33.40625 6.109375 \nQ 40.53125 6.109375 44.609375 11.75 \nQ 48.6875 17.390625 48.6875 27.296875 \nz\n\" id=\"DejaVuSans-112\"/>\n      <path d=\"M 30.609375 48.390625 \nQ 23.390625 48.390625 19.1875 42.75 \nQ 14.984375 37.109375 14.984375 27.296875 \nQ 14.984375 17.484375 19.15625 11.84375 \nQ 23.34375 6.203125 30.609375 6.203125 \nQ 37.796875 6.203125 41.984375 11.859375 \nQ 46.1875 17.53125 46.1875 27.296875 \nQ 46.1875 37.015625 41.984375 42.703125 \nQ 37.796875 48.390625 30.609375 48.390625 \nz\nM 30.609375 56 \nQ 42.328125 56 49.015625 48.375 \nQ 55.71875 40.765625 55.71875 27.296875 \nQ 55.71875 13.875 49.015625 6.21875 \nQ 42.328125 -1.421875 30.609375 -1.421875 \nQ 18.84375 -1.421875 12.171875 6.21875 \nQ 5.515625 13.875 5.515625 27.296875 \nQ 5.515625 40.765625 12.171875 48.375 \nQ 18.84375 56 30.609375 56 \nz\n\" id=\"DejaVuSans-111\"/>\n      <path d=\"M 48.78125 52.59375 \nL 48.78125 44.1875 \nQ 44.96875 46.296875 41.140625 47.34375 \nQ 37.3125 48.390625 33.40625 48.390625 \nQ 24.65625 48.390625 19.8125 42.84375 \nQ 14.984375 37.3125 14.984375 27.296875 \nQ 14.984375 17.28125 19.8125 11.734375 \nQ 24.65625 6.203125 33.40625 6.203125 \nQ 37.3125 6.203125 41.140625 7.25 \nQ 44.96875 8.296875 48.78125 10.40625 \nL 48.78125 2.09375 \nQ 45.015625 0.34375 40.984375 -0.53125 \nQ 36.96875 -1.421875 32.421875 -1.421875 \nQ 20.0625 -1.421875 12.78125 6.34375 \nQ 5.515625 14.109375 5.515625 27.296875 \nQ 5.515625 40.671875 12.859375 48.328125 \nQ 20.21875 56 33.015625 56 \nQ 37.15625 56 41.109375 55.140625 \nQ 45.0625 54.296875 48.78125 52.59375 \nz\n\" id=\"DejaVuSans-99\"/>\n      <path d=\"M 54.890625 33.015625 \nL 54.890625 0 \nL 45.90625 0 \nL 45.90625 32.71875 \nQ 45.90625 40.484375 42.875 44.328125 \nQ 39.84375 48.1875 33.796875 48.1875 \nQ 26.515625 48.1875 22.3125 43.546875 \nQ 18.109375 38.921875 18.109375 30.90625 \nL 18.109375 0 \nL 9.078125 0 \nL 9.078125 75.984375 \nL 18.109375 75.984375 \nL 18.109375 46.1875 \nQ 21.34375 51.125 25.703125 53.5625 \nQ 30.078125 56 35.796875 56 \nQ 45.21875 56 50.046875 50.171875 \nQ 54.890625 44.34375 54.890625 33.015625 \nz\n\" id=\"DejaVuSans-104\"/>\n     </defs>\n     <g transform=\"translate(132.565625 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-101\"/>\n      <use x=\"61.523438\" xlink:href=\"#DejaVuSans-112\"/>\n      <use x=\"125\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"186.181641\" xlink:href=\"#DejaVuSans-99\"/>\n      <use x=\"241.162109\" xlink:href=\"#DejaVuSans-104\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_6\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"ma8e7cd82fb\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#ma8e7cd82fb\" y=\"132.899716\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0.25 -->\n      <g transform=\"translate(20.878125 136.698935)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#ma8e7cd82fb\" y=\"106.810786\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0.30 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 110.610005)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#ma8e7cd82fb\" y=\"80.721856\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 0.35 -->\n      <g transform=\"translate(20.878125 84.521075)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#ma8e7cd82fb\" y=\"54.632926\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 0.40 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(20.878125 58.432145)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#ma8e7cd82fb\" y=\"28.543997\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 0.45 -->\n      <g transform=\"translate(20.878125 32.343215)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_12\">\n     <!-- loss -->\n     <defs>\n      <path d=\"M 9.421875 75.984375 \nL 18.40625 75.984375 \nL 18.40625 0 \nL 9.421875 0 \nz\n\" id=\"DejaVuSans-108\"/>\n      <path d=\"M 44.28125 53.078125 \nL 44.28125 44.578125 \nQ 40.484375 46.53125 36.375 47.5 \nQ 32.28125 48.484375 27.875 48.484375 \nQ 21.1875 48.484375 17.84375 46.4375 \nQ 14.5 44.390625 14.5 40.28125 \nQ 14.5 37.15625 16.890625 35.375 \nQ 19.28125 33.59375 26.515625 31.984375 \nL 29.59375 31.296875 \nQ 39.15625 29.25 43.1875 25.515625 \nQ 47.21875 21.78125 47.21875 15.09375 \nQ 47.21875 7.46875 41.1875 3.015625 \nQ 35.15625 -1.421875 24.609375 -1.421875 \nQ 20.21875 -1.421875 15.453125 -0.5625 \nQ 10.6875 0.296875 5.421875 2 \nL 5.421875 11.28125 \nQ 10.40625 8.6875 15.234375 7.390625 \nQ 20.0625 6.109375 24.8125 6.109375 \nQ 31.15625 6.109375 34.5625 8.28125 \nQ 37.984375 10.453125 37.984375 14.40625 \nQ 37.984375 18.0625 35.515625 20.015625 \nQ 33.0625 21.96875 24.703125 23.78125 \nL 21.578125 24.515625 \nQ 13.234375 26.265625 9.515625 29.90625 \nQ 5.8125 33.546875 5.8125 39.890625 \nQ 5.8125 47.609375 11.28125 51.796875 \nQ 16.75 56 26.8125 56 \nQ 31.78125 56 36.171875 55.265625 \nQ 40.578125 54.546875 44.28125 53.078125 \nz\n\" id=\"DejaVuSans-115\"/>\n     </defs>\n     <g transform=\"translate(14.798437 84.807812)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-108\"/>\n      <use x=\"27.783203\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"88.964844\" xlink:href=\"#DejaVuSans-115\"/>\n      <use x=\"141.064453\" xlink:href=\"#DejaVuSans-115\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_11\">\n    <path clip-path=\"url(#p3d899969a9)\" d=\"M 59.021023 13.377273 \nL 64.939205 63.668935 \nL 70.857386 96.11612 \nL 76.775568 115.632789 \nL 82.69375 126.839626 \nL 88.611932 128.892099 \nL 94.530114 133.069011 \nL 100.448295 132.775952 \nL 106.366477 134.216562 \nL 112.284659 135.962012 \nL 118.202841 135.959049 \nL 124.121023 134.935379 \nL 130.039205 134.476399 \nL 135.957386 135.358702 \nL 141.875568 135.151395 \nL 147.79375 136.429692 \nL 153.711932 134.615223 \nL 159.630114 133.960334 \nL 165.548295 136.410768 \nL 171.466477 136.40356 \nL 177.384659 136.817056 \nL 183.302841 131.560018 \nL 189.221023 135.895371 \nL 195.139205 136.523577 \nL 201.057386 136.577645 \nL 206.975568 135.607039 \nL 212.89375 135.758786 \nL 218.811932 136.922727 \nL 224.730114 135.673967 \nL 230.648295 135.068699 \nL 236.566477 135.837112 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 50.14375 143.1 \nL 50.14375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 245.44375 143.1 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 50.14375 7.2 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p3d899969a9\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"50.14375\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "pnFDyg5iCC6s",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "85c0e68c-9971-4231-bfb6-36164319f6c5"
      },
      "source": [
        "train_sgd(0.05, 10)"
      ],
      "execution_count": 23,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "loss: 0.244513, 0.133338 sec per epoch\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 252.64375 180.65625\" width=\"252.64375pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 252.64375 180.65625 \nL 252.64375 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \nL 245.44375 7.2 \nL 50.14375 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"mc83f0f787d\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"59.021023\" xlink:href=\"#mc83f0f787d\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- 0.0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n       <path d=\"M 10.6875 12.40625 \nL 21 12.40625 \nL 21 0 \nL 10.6875 0 \nz\n\" id=\"DejaVuSans-46\"/>\n      </defs>\n      <g transform=\"translate(51.06946 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"103.407386\" xlink:href=\"#mc83f0f787d\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- 0.5 -->\n      <defs>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(95.455824 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"147.79375\" xlink:href=\"#mc83f0f787d\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 1.0 -->\n      <defs>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n      </defs>\n      <g transform=\"translate(139.842187 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"192.180114\" xlink:href=\"#mc83f0f787d\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 1.5 -->\n      <g transform=\"translate(184.228551 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"236.566477\" xlink:href=\"#mc83f0f787d\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 2.0 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(228.614915 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_6\">\n     <!-- epoch -->\n     <defs>\n      <path d=\"M 56.203125 29.59375 \nL 56.203125 25.203125 \nL 14.890625 25.203125 \nQ 15.484375 15.921875 20.484375 11.0625 \nQ 25.484375 6.203125 34.421875 6.203125 \nQ 39.59375 6.203125 44.453125 7.46875 \nQ 49.3125 8.734375 54.109375 11.28125 \nL 54.109375 2.78125 \nQ 49.265625 0.734375 44.1875 -0.34375 \nQ 39.109375 -1.421875 33.890625 -1.421875 \nQ 20.796875 -1.421875 13.15625 6.1875 \nQ 5.515625 13.8125 5.515625 26.8125 \nQ 5.515625 40.234375 12.765625 48.109375 \nQ 20.015625 56 32.328125 56 \nQ 43.359375 56 49.78125 48.890625 \nQ 56.203125 41.796875 56.203125 29.59375 \nz\nM 47.21875 32.234375 \nQ 47.125 39.59375 43.09375 43.984375 \nQ 39.0625 48.390625 32.421875 48.390625 \nQ 24.90625 48.390625 20.390625 44.140625 \nQ 15.875 39.890625 15.1875 32.171875 \nz\n\" id=\"DejaVuSans-101\"/>\n      <path d=\"M 18.109375 8.203125 \nL 18.109375 -20.796875 \nL 9.078125 -20.796875 \nL 9.078125 54.6875 \nL 18.109375 54.6875 \nL 18.109375 46.390625 \nQ 20.953125 51.265625 25.265625 53.625 \nQ 29.59375 56 35.59375 56 \nQ 45.5625 56 51.78125 48.09375 \nQ 58.015625 40.1875 58.015625 27.296875 \nQ 58.015625 14.40625 51.78125 6.484375 \nQ 45.5625 -1.421875 35.59375 -1.421875 \nQ 29.59375 -1.421875 25.265625 0.953125 \nQ 20.953125 3.328125 18.109375 8.203125 \nz\nM 48.6875 27.296875 \nQ 48.6875 37.203125 44.609375 42.84375 \nQ 40.53125 48.484375 33.40625 48.484375 \nQ 26.265625 48.484375 22.1875 42.84375 \nQ 18.109375 37.203125 18.109375 27.296875 \nQ 18.109375 17.390625 22.1875 11.75 \nQ 26.265625 6.109375 33.40625 6.109375 \nQ 40.53125 6.109375 44.609375 11.75 \nQ 48.6875 17.390625 48.6875 27.296875 \nz\n\" id=\"DejaVuSans-112\"/>\n      <path d=\"M 30.609375 48.390625 \nQ 23.390625 48.390625 19.1875 42.75 \nQ 14.984375 37.109375 14.984375 27.296875 \nQ 14.984375 17.484375 19.15625 11.84375 \nQ 23.34375 6.203125 30.609375 6.203125 \nQ 37.796875 6.203125 41.984375 11.859375 \nQ 46.1875 17.53125 46.1875 27.296875 \nQ 46.1875 37.015625 41.984375 42.703125 \nQ 37.796875 48.390625 30.609375 48.390625 \nz\nM 30.609375 56 \nQ 42.328125 56 49.015625 48.375 \nQ 55.71875 40.765625 55.71875 27.296875 \nQ 55.71875 13.875 49.015625 6.21875 \nQ 42.328125 -1.421875 30.609375 -1.421875 \nQ 18.84375 -1.421875 12.171875 6.21875 \nQ 5.515625 13.875 5.515625 27.296875 \nQ 5.515625 40.765625 12.171875 48.375 \nQ 18.84375 56 30.609375 56 \nz\n\" id=\"DejaVuSans-111\"/>\n      <path d=\"M 48.78125 52.59375 \nL 48.78125 44.1875 \nQ 44.96875 46.296875 41.140625 47.34375 \nQ 37.3125 48.390625 33.40625 48.390625 \nQ 24.65625 48.390625 19.8125 42.84375 \nQ 14.984375 37.3125 14.984375 27.296875 \nQ 14.984375 17.28125 19.8125 11.734375 \nQ 24.65625 6.203125 33.40625 6.203125 \nQ 37.3125 6.203125 41.140625 7.25 \nQ 44.96875 8.296875 48.78125 10.40625 \nL 48.78125 2.09375 \nQ 45.015625 0.34375 40.984375 -0.53125 \nQ 36.96875 -1.421875 32.421875 -1.421875 \nQ 20.0625 -1.421875 12.78125 6.34375 \nQ 5.515625 14.109375 5.515625 27.296875 \nQ 5.515625 40.671875 12.859375 48.328125 \nQ 20.21875 56 33.015625 56 \nQ 37.15625 56 41.109375 55.140625 \nQ 45.0625 54.296875 48.78125 52.59375 \nz\n\" id=\"DejaVuSans-99\"/>\n      <path d=\"M 54.890625 33.015625 \nL 54.890625 0 \nL 45.90625 0 \nL 45.90625 32.71875 \nQ 45.90625 40.484375 42.875 44.328125 \nQ 39.84375 48.1875 33.796875 48.1875 \nQ 26.515625 48.1875 22.3125 43.546875 \nQ 18.109375 38.921875 18.109375 30.90625 \nL 18.109375 0 \nL 9.078125 0 \nL 9.078125 75.984375 \nL 18.109375 75.984375 \nL 18.109375 46.1875 \nQ 21.34375 51.125 25.703125 53.5625 \nQ 30.078125 56 35.796875 56 \nQ 45.21875 56 50.046875 50.171875 \nQ 54.890625 44.34375 54.890625 33.015625 \nz\n\" id=\"DejaVuSans-104\"/>\n     </defs>\n     <g transform=\"translate(132.565625 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-101\"/>\n      <use x=\"61.523438\" xlink:href=\"#DejaVuSans-112\"/>\n      <use x=\"125\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"186.181641\" xlink:href=\"#DejaVuSans-99\"/>\n      <use x=\"241.162109\" xlink:href=\"#DejaVuSans-104\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_6\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m40d9cb2da8\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m40d9cb2da8\" y=\"133.538984\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0.25 -->\n      <g transform=\"translate(20.878125 137.338203)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m40d9cb2da8\" y=\"107.936621\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0.30 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 111.73584)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m40d9cb2da8\" y=\"82.334258\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 0.35 -->\n      <g transform=\"translate(20.878125 86.133476)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m40d9cb2da8\" y=\"56.731894\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 0.40 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(20.878125 60.531113)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m40d9cb2da8\" y=\"31.129531\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 0.45 -->\n      <g transform=\"translate(20.878125 34.92875)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_12\">\n     <!-- loss -->\n     <defs>\n      <path d=\"M 9.421875 75.984375 \nL 18.40625 75.984375 \nL 18.40625 0 \nL 9.421875 0 \nz\n\" id=\"DejaVuSans-108\"/>\n      <path d=\"M 44.28125 53.078125 \nL 44.28125 44.578125 \nQ 40.484375 46.53125 36.375 47.5 \nQ 32.28125 48.484375 27.875 48.484375 \nQ 21.1875 48.484375 17.84375 46.4375 \nQ 14.5 44.390625 14.5 40.28125 \nQ 14.5 37.15625 16.890625 35.375 \nQ 19.28125 33.59375 26.515625 31.984375 \nL 29.59375 31.296875 \nQ 39.15625 29.25 43.1875 25.515625 \nQ 47.21875 21.78125 47.21875 15.09375 \nQ 47.21875 7.46875 41.1875 3.015625 \nQ 35.15625 -1.421875 24.609375 -1.421875 \nQ 20.21875 -1.421875 15.453125 -0.5625 \nQ 10.6875 0.296875 5.421875 2 \nL 5.421875 11.28125 \nQ 10.40625 8.6875 15.234375 7.390625 \nQ 20.0625 6.109375 24.8125 6.109375 \nQ 31.15625 6.109375 34.5625 8.28125 \nQ 37.984375 10.453125 37.984375 14.40625 \nQ 37.984375 18.0625 35.515625 20.015625 \nQ 33.0625 21.96875 24.703125 23.78125 \nL 21.578125 24.515625 \nQ 13.234375 26.265625 9.515625 29.90625 \nQ 5.8125 33.546875 5.8125 39.890625 \nQ 5.8125 47.609375 11.28125 51.796875 \nQ 16.75 56 26.8125 56 \nQ 31.78125 56 36.171875 55.265625 \nQ 40.578125 54.546875 44.28125 53.078125 \nz\n\" id=\"DejaVuSans-115\"/>\n     </defs>\n     <g transform=\"translate(14.798437 84.807812)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-108\"/>\n      <use x=\"27.783203\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"88.964844\" xlink:href=\"#DejaVuSans-115\"/>\n      <use x=\"141.064453\" xlink:href=\"#DejaVuSans-115\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_11\">\n    <path clip-path=\"url(#p8eb9107d9e)\" d=\"M 59.021023 13.377273 \nL 64.939205 60.640211 \nL 70.857386 108.247343 \nL 76.775568 116.853164 \nL 82.69375 123.272885 \nL 88.611932 129.998268 \nL 94.530114 132.995874 \nL 100.448295 134.937955 \nL 106.366477 135.835766 \nL 112.284659 136.282303 \nL 118.202841 136.183836 \nL 124.121023 136.290032 \nL 130.039205 133.611661 \nL 135.957386 135.738254 \nL 141.875568 132.316658 \nL 147.79375 136.110931 \nL 153.711932 135.650179 \nL 159.630114 133.903619 \nL 165.548295 136.258703 \nL 171.466477 135.701881 \nL 177.384659 135.959458 \nL 183.302841 136.922727 \nL 189.221023 135.543183 \nL 195.139205 135.235766 \nL 201.057386 136.40881 \nL 206.975568 133.829355 \nL 212.89375 136.568424 \nL 218.811932 135.673703 \nL 224.730114 136.259634 \nL 230.648295 136.040444 \nL 236.566477 136.348784 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 50.14375 143.1 \nL 50.14375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 245.44375 143.1 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 50.14375 7.2 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p8eb9107d9e\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"50.14375\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "rE6JqBVDCeAh",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "def train_gluon_ch7(trainer_name, trainer_hyperparams, features, labels, batch_size=10, num_epochs=2):\n",
        "    net = nn.Sequential()\n",
        "    net.add(nn.Dense(1))\n",
        "    net.initialize(init.Normal(sigma=0.01))\n",
        "    loss = gloss.L2Loss()\n",
        "\n",
        "    def eval_loss():\n",
        "        return loss(net(features), labels).mean().asscalar()\n",
        "\n",
        "    ls = [eval_loss()]\n",
        "    data_iter = gdata.DataLoader(gdata.ArrayDataset(features, labels), batch_size, shuffle=True)\n",
        "    trainer = gluon.Trainer(net.collect_params(), trainer_name, trainer_hyperparams)\n",
        "    for _ in range(num_epochs):\n",
        "        start = time.time()\n",
        "        for batch_i, (X, y) in enumerate(data_iter):\n",
        "            with autograd.record():\n",
        "                l = loss(net(X), y)\n",
        "            l.backward()\n",
        "            trainer.step(batch_size)\n",
        "            if (batch_i + 1) * batch_size % 100 == 0:\n",
        "                ls.append(eval_loss())\n",
        "\n",
        "    print('loss: %f, %f sec per epoch' % (ls[-1], time.time() - start))\n",
        "    d2l.set_figsize()\n",
        "    d2l.plt.plot(np.linspace(0, num_epochs, len(ls)), ls)\n",
        "    d2l.plt.xlabel('epoch')\n",
        "    d2l.plt.ylabel('loss')"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "AFEV2fuDFYxZ",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "c8b5aa6a-8b45-422e-b6c6-9d1608d5d51e"
      },
      "source": [
        "train_gluon_ch7('sgd', {'learning_rate': 0.05}, features, labels, 10)"
      ],
      "execution_count": 25,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "loss: 0.244802, 0.132542 sec per epoch\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 252.64375 180.65625\" width=\"252.64375pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 252.64375 180.65625 \nL 252.64375 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \nL 245.44375 7.2 \nL 50.14375 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m54c9028413\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"59.021023\" xlink:href=\"#m54c9028413\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- 0.0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n       <path d=\"M 10.6875 12.40625 \nL 21 12.40625 \nL 21 0 \nL 10.6875 0 \nz\n\" id=\"DejaVuSans-46\"/>\n      </defs>\n      <g transform=\"translate(51.06946 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"103.407386\" xlink:href=\"#m54c9028413\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- 0.5 -->\n      <defs>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(95.455824 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"147.79375\" xlink:href=\"#m54c9028413\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 1.0 -->\n      <defs>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n      </defs>\n      <g transform=\"translate(139.842187 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"192.180114\" xlink:href=\"#m54c9028413\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 1.5 -->\n      <g transform=\"translate(184.228551 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"236.566477\" xlink:href=\"#m54c9028413\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 2.0 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(228.614915 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_6\">\n     <!-- epoch -->\n     <defs>\n      <path d=\"M 56.203125 29.59375 \nL 56.203125 25.203125 \nL 14.890625 25.203125 \nQ 15.484375 15.921875 20.484375 11.0625 \nQ 25.484375 6.203125 34.421875 6.203125 \nQ 39.59375 6.203125 44.453125 7.46875 \nQ 49.3125 8.734375 54.109375 11.28125 \nL 54.109375 2.78125 \nQ 49.265625 0.734375 44.1875 -0.34375 \nQ 39.109375 -1.421875 33.890625 -1.421875 \nQ 20.796875 -1.421875 13.15625 6.1875 \nQ 5.515625 13.8125 5.515625 26.8125 \nQ 5.515625 40.234375 12.765625 48.109375 \nQ 20.015625 56 32.328125 56 \nQ 43.359375 56 49.78125 48.890625 \nQ 56.203125 41.796875 56.203125 29.59375 \nz\nM 47.21875 32.234375 \nQ 47.125 39.59375 43.09375 43.984375 \nQ 39.0625 48.390625 32.421875 48.390625 \nQ 24.90625 48.390625 20.390625 44.140625 \nQ 15.875 39.890625 15.1875 32.171875 \nz\n\" id=\"DejaVuSans-101\"/>\n      <path d=\"M 18.109375 8.203125 \nL 18.109375 -20.796875 \nL 9.078125 -20.796875 \nL 9.078125 54.6875 \nL 18.109375 54.6875 \nL 18.109375 46.390625 \nQ 20.953125 51.265625 25.265625 53.625 \nQ 29.59375 56 35.59375 56 \nQ 45.5625 56 51.78125 48.09375 \nQ 58.015625 40.1875 58.015625 27.296875 \nQ 58.015625 14.40625 51.78125 6.484375 \nQ 45.5625 -1.421875 35.59375 -1.421875 \nQ 29.59375 -1.421875 25.265625 0.953125 \nQ 20.953125 3.328125 18.109375 8.203125 \nz\nM 48.6875 27.296875 \nQ 48.6875 37.203125 44.609375 42.84375 \nQ 40.53125 48.484375 33.40625 48.484375 \nQ 26.265625 48.484375 22.1875 42.84375 \nQ 18.109375 37.203125 18.109375 27.296875 \nQ 18.109375 17.390625 22.1875 11.75 \nQ 26.265625 6.109375 33.40625 6.109375 \nQ 40.53125 6.109375 44.609375 11.75 \nQ 48.6875 17.390625 48.6875 27.296875 \nz\n\" id=\"DejaVuSans-112\"/>\n      <path d=\"M 30.609375 48.390625 \nQ 23.390625 48.390625 19.1875 42.75 \nQ 14.984375 37.109375 14.984375 27.296875 \nQ 14.984375 17.484375 19.15625 11.84375 \nQ 23.34375 6.203125 30.609375 6.203125 \nQ 37.796875 6.203125 41.984375 11.859375 \nQ 46.1875 17.53125 46.1875 27.296875 \nQ 46.1875 37.015625 41.984375 42.703125 \nQ 37.796875 48.390625 30.609375 48.390625 \nz\nM 30.609375 56 \nQ 42.328125 56 49.015625 48.375 \nQ 55.71875 40.765625 55.71875 27.296875 \nQ 55.71875 13.875 49.015625 6.21875 \nQ 42.328125 -1.421875 30.609375 -1.421875 \nQ 18.84375 -1.421875 12.171875 6.21875 \nQ 5.515625 13.875 5.515625 27.296875 \nQ 5.515625 40.765625 12.171875 48.375 \nQ 18.84375 56 30.609375 56 \nz\n\" id=\"DejaVuSans-111\"/>\n      <path d=\"M 48.78125 52.59375 \nL 48.78125 44.1875 \nQ 44.96875 46.296875 41.140625 47.34375 \nQ 37.3125 48.390625 33.40625 48.390625 \nQ 24.65625 48.390625 19.8125 42.84375 \nQ 14.984375 37.3125 14.984375 27.296875 \nQ 14.984375 17.28125 19.8125 11.734375 \nQ 24.65625 6.203125 33.40625 6.203125 \nQ 37.3125 6.203125 41.140625 7.25 \nQ 44.96875 8.296875 48.78125 10.40625 \nL 48.78125 2.09375 \nQ 45.015625 0.34375 40.984375 -0.53125 \nQ 36.96875 -1.421875 32.421875 -1.421875 \nQ 20.0625 -1.421875 12.78125 6.34375 \nQ 5.515625 14.109375 5.515625 27.296875 \nQ 5.515625 40.671875 12.859375 48.328125 \nQ 20.21875 56 33.015625 56 \nQ 37.15625 56 41.109375 55.140625 \nQ 45.0625 54.296875 48.78125 52.59375 \nz\n\" id=\"DejaVuSans-99\"/>\n      <path d=\"M 54.890625 33.015625 \nL 54.890625 0 \nL 45.90625 0 \nL 45.90625 32.71875 \nQ 45.90625 40.484375 42.875 44.328125 \nQ 39.84375 48.1875 33.796875 48.1875 \nQ 26.515625 48.1875 22.3125 43.546875 \nQ 18.109375 38.921875 18.109375 30.90625 \nL 18.109375 0 \nL 9.078125 0 \nL 9.078125 75.984375 \nL 18.109375 75.984375 \nL 18.109375 46.1875 \nQ 21.34375 51.125 25.703125 53.5625 \nQ 30.078125 56 35.796875 56 \nQ 45.21875 56 50.046875 50.171875 \nQ 54.890625 44.34375 54.890625 33.015625 \nz\n\" id=\"DejaVuSans-104\"/>\n     </defs>\n     <g transform=\"translate(132.565625 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-101\"/>\n      <use x=\"61.523438\" xlink:href=\"#DejaVuSans-112\"/>\n      <use x=\"125\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"186.181641\" xlink:href=\"#DejaVuSans-99\"/>\n      <use x=\"241.162109\" xlink:href=\"#DejaVuSans-104\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_6\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"ma689e4ce37\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#ma689e4ce37\" y=\"133.30874\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0.25 -->\n      <g transform=\"translate(20.878125 137.107959)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#ma689e4ce37\" y=\"109.115102\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0.30 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 112.914321)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#ma689e4ce37\" y=\"84.921465\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 0.35 -->\n      <g transform=\"translate(20.878125 88.720684)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#ma689e4ce37\" y=\"60.727827\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 0.40 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(20.878125 64.527046)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#ma689e4ce37\" y=\"36.53419\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 0.45 -->\n      <g transform=\"translate(20.878125 40.333408)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_11\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#ma689e4ce37\" y=\"12.340552\"/>\n      </g>\n     </g>\n     <g id=\"text_12\">\n      <!-- 0.50 -->\n      <g transform=\"translate(20.878125 16.139771)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_13\">\n     <!-- loss -->\n     <defs>\n      <path d=\"M 9.421875 75.984375 \nL 18.40625 75.984375 \nL 18.40625 0 \nL 9.421875 0 \nz\n\" id=\"DejaVuSans-108\"/>\n      <path d=\"M 44.28125 53.078125 \nL 44.28125 44.578125 \nQ 40.484375 46.53125 36.375 47.5 \nQ 32.28125 48.484375 27.875 48.484375 \nQ 21.1875 48.484375 17.84375 46.4375 \nQ 14.5 44.390625 14.5 40.28125 \nQ 14.5 37.15625 16.890625 35.375 \nQ 19.28125 33.59375 26.515625 31.984375 \nL 29.59375 31.296875 \nQ 39.15625 29.25 43.1875 25.515625 \nQ 47.21875 21.78125 47.21875 15.09375 \nQ 47.21875 7.46875 41.1875 3.015625 \nQ 35.15625 -1.421875 24.609375 -1.421875 \nQ 20.21875 -1.421875 15.453125 -0.5625 \nQ 10.6875 0.296875 5.421875 2 \nL 5.421875 11.28125 \nQ 10.40625 8.6875 15.234375 7.390625 \nQ 20.0625 6.109375 24.8125 6.109375 \nQ 31.15625 6.109375 34.5625 8.28125 \nQ 37.984375 10.453125 37.984375 14.40625 \nQ 37.984375 18.0625 35.515625 20.015625 \nQ 33.0625 21.96875 24.703125 23.78125 \nL 21.578125 24.515625 \nQ 13.234375 26.265625 9.515625 29.90625 \nQ 5.8125 33.546875 5.8125 39.890625 \nQ 5.8125 47.609375 11.28125 51.796875 \nQ 16.75 56 26.8125 56 \nQ 31.78125 56 36.171875 55.265625 \nQ 40.578125 54.546875 44.28125 53.078125 \nz\n\" id=\"DejaVuSans-115\"/>\n     </defs>\n     <g transform=\"translate(14.798437 84.807812)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-108\"/>\n      <use x=\"27.783203\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"88.964844\" xlink:href=\"#DejaVuSans-115\"/>\n      <use x=\"141.064453\" xlink:href=\"#DejaVuSans-115\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_12\">\n    <path clip-path=\"url(#pe93233534b)\" d=\"M 59.021023 13.377273 \nL 64.939205 65.080864 \nL 70.857386 99.026738 \nL 76.775568 115.723392 \nL 82.69375 119.639605 \nL 88.611932 123.30105 \nL 94.530114 130.445774 \nL 100.448295 134.464365 \nL 106.366477 134.965681 \nL 112.284659 134.368721 \nL 118.202841 135.245432 \nL 124.121023 132.848869 \nL 130.039205 135.079524 \nL 135.957386 135.780181 \nL 141.875568 135.967007 \nL 147.79375 135.273732 \nL 153.711932 134.827417 \nL 159.630114 135.033292 \nL 165.548295 135.308298 \nL 171.466477 132.318396 \nL 177.384659 134.718917 \nL 183.302841 136.529314 \nL 189.221023 135.14239 \nL 195.139205 134.469031 \nL 201.057386 135.68029 \nL 206.975568 136.2964 \nL 212.89375 136.555645 \nL 218.811932 136.278548 \nL 224.730114 136.922727 \nL 230.648295 136.424246 \nL 236.566477 135.82415 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 50.14375 143.1 \nL 50.14375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 245.44375 143.1 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 50.14375 7.2 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"pe93233534b\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"50.14375\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "Uw7INE81Fk8Y",
        "colab_type": "text"
      },
      "source": [
        "## 7.4 动量法"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "HC-Yqg_FF5E3",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 280
        },
        "outputId": "c908f61b-154f-4e25-f2c0-2bfa9af03e2c"
      },
      "source": [
        "%matplotlib inline \n",
        "import d2lzh as d2l \n",
        "from mxnet import nd \n",
        "\n",
        "eta = 0.4 \n",
        "\n",
        "def f_2d(x1, x2):\n",
        "    return 0.1 * x1 ** 2 + 2 * x2 ** 2 \n",
        "\n",
        "def gd_2d(x1, x2, s1, s2):\n",
        "    return (x1 - eta * 0.2 * x1, x2 - eta * 4 * x2, 0, 0)\n",
        "\n",
        "d2l.show_trace_2d(f_2d, d2l.train_2d(gd_2d))"
      ],
      "execution_count": 26,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "epoch 20, x1 -0.943467, x2 -0.000073\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"181.790763pt\" version=\"1.1\" viewBox=\"0 0 245.120313 181.790763\" width=\"245.120313pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 181.790763 \nL 245.120313 181.790763 \nL 245.120313 -0 \nL 0 -0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 42.620312 144.234513 \nL 237.920313 144.234513 \nL 237.920313 8.334513 \nL 42.620312 8.334513 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m8243951f94\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"88.39375\" xlink:href=\"#m8243951f94\" y=\"144.234513\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- −4 -->\n      <defs>\n       <path d=\"M 10.59375 35.5 \nL 73.1875 35.5 \nL 73.1875 27.203125 \nL 10.59375 27.203125 \nz\n\" id=\"DejaVuSans-8722\"/>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(81.022656 158.83295)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-52\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"149.425\" xlink:href=\"#m8243951f94\" y=\"144.234513\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- −2 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(142.053906 158.83295)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"210.45625\" xlink:href=\"#m8243951f94\" y=\"144.234513\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n      </defs>\n      <g transform=\"translate(207.275 158.83295)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_4\">\n     <!-- x1 -->\n     <defs>\n      <path d=\"M 54.890625 54.6875 \nL 35.109375 28.078125 \nL 55.90625 0 \nL 45.3125 0 \nL 29.390625 21.484375 \nL 13.484375 0 \nL 2.875 0 \nL 24.125 28.609375 \nL 4.6875 54.6875 \nL 15.28125 54.6875 \nL 29.78125 35.203125 \nL 44.28125 54.6875 \nz\n\" id=\"DejaVuSans-120\"/>\n      <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n     </defs>\n     <g transform=\"translate(134.129687 172.511075)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-49\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_4\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m9b304c4453\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m9b304c4453\" y=\"144.234513\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- −3 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 148.033732)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-51\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m9b304c4453\" y=\"117.587454\"/>\n      </g>\n     </g>\n     <g id=\"text_6\">\n      <!-- −2 -->\n      <g transform=\"translate(20.878125 121.386673)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_6\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m9b304c4453\" y=\"90.940395\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- −1 -->\n      <g transform=\"translate(20.878125 94.739614)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-49\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m9b304c4453\" y=\"64.293336\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0 -->\n      <g transform=\"translate(29.257812 68.092555)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m9b304c4453\" y=\"37.646278\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 1 -->\n      <g transform=\"translate(29.257812 41.445496)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m9b304c4453\" y=\"10.999219\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 2 -->\n      <g transform=\"translate(29.257812 14.798437)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_11\">\n     <!-- x2 -->\n     <g transform=\"translate(14.798437 82.425138)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-50\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"LineCollection_1\"/>\n   <g id=\"LineCollection_2\">\n    <path clip-path=\"url(#p09a7607aa4)\" d=\"M 237.920313 96.477654 \nL 222.6625 96.824066 \nL 207.404688 96.904007 \nL 192.146875 96.717478 \nL 176.889063 96.264014 \nL 164.682813 95.661559 \nL 152.476563 94.873733 \nL 140.270313 93.900536 \nL 131.115625 92.996025 \nL 118.909375 91.574849 \nL 109.754688 90.316293 \nL 97.100875 88.275689 \nL 85.342188 85.916641 \nL 82.290625 85.22016 \nL 73.135938 82.895033 \nL 63.98125 79.990877 \nL 57.878125 77.616866 \nL 52.486044 74.95216 \nL 48.409725 72.287454 \nL 45.559891 69.622748 \nL 43.880132 66.958042 \nL 43.320212 64.293336 \nL 43.880132 61.628631 \nL 45.671875 58.857336 \nL 48.723438 56.089849 \nL 52.486044 53.634513 \nL 57.878125 50.969807 \nL 64.752171 48.305101 \nL 73.307374 45.640395 \nL 83.908321 42.975689 \nL 94.496875 40.812575 \nL 100.6 39.721943 \nL 113.96875 37.646278 \nL 125.0125 36.275857 \nL 137.21875 34.9584 \nL 149.425 33.938861 \nL 161.63125 33.104692 \nL 173.8375 32.455894 \nL 186.04375 32.018419 \nL 201.301563 31.725301 \nL 216.559375 31.698654 \nL 231.817188 31.938478 \nL 237.920313 32.109019 \nL 237.920313 32.109019 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_3\">\n    <path clip-path=\"url(#p09a7607aa4)\" d=\"M 237.920313 110.122471 \nL 234.86875 110.187185 \nL 231.817188 110.244286 \nL 228.765625 110.293773 \nL 225.714063 110.335647 \nL 222.6625 110.369908 \nL 219.610938 110.396555 \nL 216.559375 110.415588 \nL 213.507813 110.427009 \nL 210.45625 110.430815 \nL 207.404688 110.427009 \nL 204.353125 110.415588 \nL 201.301563 110.396555 \nL 198.25 110.369908 \nL 195.198438 110.335647 \nL 192.146875 110.293773 \nL 189.095313 110.244286 \nL 186.04375 110.187185 \nL 182.992188 110.122471 \nL 179.940625 110.050143 \nL 176.889063 109.970202 \nL 173.8375 109.882647 \nL 170.785938 109.787479 \nL 167.734375 109.684698 \nL 165.208944 109.593336 \nL 164.682813 109.573149 \nL 161.63125 109.447989 \nL 158.579688 109.314754 \nL 155.528125 109.173443 \nL 152.476563 109.024058 \nL 149.425 108.866598 \nL 146.373438 108.701064 \nL 143.321875 108.527454 \nL 140.270313 108.34577 \nL 137.21875 108.15601 \nL 134.167188 107.958176 \nL 131.115625 107.752267 \nL 128.064063 107.538283 \nL 125.0125 107.316224 \nL 121.960938 107.08609 \nL 119.943803 106.928631 \nL 118.909375 106.842672 \nL 115.857813 106.5805 \nL 112.80625 106.309731 \nL 109.754688 106.030367 \nL 106.703125 105.742407 \nL 103.651563 105.445851 \nL 100.6 105.140699 \nL 97.548438 104.826951 \nL 94.496875 104.504608 \nL 92.277557 104.263925 \nL 91.445313 104.167444 \nL 88.39375 103.804493 \nL 85.342188 103.432353 \nL 82.290625 103.051024 \nL 79.239063 102.660507 \nL 76.1875 102.260801 \nL 73.135938 101.851906 \nL 71.291587 101.599219 \nL 70.084375 101.421572 \nL 67.032813 100.96265 \nL 63.98125 100.493859 \nL 60.929688 100.015199 \nL 57.878125 99.52667 \nL 54.826563 99.028271 \nL 54.263653 98.934513 \nL 51.775 98.486842 \nL 48.723438 97.927254 \nL 45.671875 97.357007 \nL 42.620313 96.776101 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#p09a7607aa4)\" d=\"M 42.620313 31.810572 \nL 45.671875 31.229666 \nL 48.723438 30.659419 \nL 51.775 30.099831 \nL 54.263653 29.65216 \nL 54.826563 29.558402 \nL 57.878125 29.060003 \nL 60.929688 28.571474 \nL 63.98125 28.092814 \nL 67.032813 27.624023 \nL 70.084375 27.165101 \nL 71.291587 26.987454 \nL 73.135938 26.734766 \nL 76.1875 26.325872 \nL 79.239063 25.926166 \nL 82.290625 25.535649 \nL 85.342188 25.15432 \nL 88.39375 24.78218 \nL 91.445313 24.419229 \nL 92.277557 24.322748 \nL 94.496875 24.082065 \nL 97.548438 23.759722 \nL 100.6 23.445974 \nL 103.651563 23.140822 \nL 106.703125 22.844266 \nL 109.754688 22.556306 \nL 112.80625 22.276942 \nL 115.857813 22.006173 \nL 118.909375 21.744001 \nL 119.943803 21.658042 \nL 121.960938 21.500582 \nL 125.0125 21.270449 \nL 128.064063 21.04839 \nL 131.115625 20.834406 \nL 134.167188 20.628497 \nL 137.21875 20.430663 \nL 140.270313 20.240903 \nL 143.321875 20.059219 \nL 146.373438 19.885609 \nL 149.425 19.720074 \nL 152.476563 19.562614 \nL 155.528125 19.413229 \nL 158.579688 19.271919 \nL 161.63125 19.138684 \nL 164.682813 19.013524 \nL 165.208944 18.993336 \nL 167.734375 18.901975 \nL 170.785938 18.799194 \nL 173.8375 18.704025 \nL 176.889063 18.616471 \nL 179.940625 18.53653 \nL 182.992188 18.464202 \nL 186.04375 18.399488 \nL 189.095313 18.342387 \nL 192.146875 18.292899 \nL 195.198438 18.251025 \nL 198.25 18.216765 \nL 201.301563 18.190118 \nL 204.353125 18.171084 \nL 207.404688 18.159664 \nL 210.45625 18.155857 \nL 213.507813 18.159664 \nL 216.559375 18.171084 \nL 219.610938 18.190118 \nL 222.6625 18.216765 \nL 225.714063 18.251025 \nL 228.765625 18.292899 \nL 231.817188 18.342387 \nL 234.86875 18.399488 \nL 237.920313 18.464202 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_4\">\n    <path clip-path=\"url(#p09a7607aa4)\" d=\"M 237.920313 120.558911 \nL 234.86875 120.611585 \nL 231.817188 120.658063 \nL 228.765625 120.698343 \nL 225.714063 120.732427 \nL 222.6625 120.760313 \nL 219.610938 120.782003 \nL 216.559375 120.797495 \nL 213.507813 120.806791 \nL 210.45625 120.809889 \nL 207.404688 120.806791 \nL 204.353125 120.797495 \nL 201.301563 120.782003 \nL 198.25 120.760313 \nL 195.198438 120.732427 \nL 192.146875 120.698343 \nL 189.095313 120.658063 \nL 186.04375 120.611585 \nL 182.992188 120.558911 \nL 179.940625 120.50004 \nL 176.889063 120.434971 \nL 173.8375 120.363706 \nL 170.785938 120.286243 \nL 169.542708 120.25216 \nL 167.734375 120.200166 \nL 164.682813 120.105926 \nL 161.63125 120.005187 \nL 158.579688 119.897949 \nL 155.528125 119.784212 \nL 152.476563 119.663975 \nL 149.425 119.537239 \nL 146.373438 119.404004 \nL 143.321875 119.264269 \nL 140.270313 119.118035 \nL 137.21875 118.965302 \nL 134.167188 118.80607 \nL 131.115625 118.640338 \nL 128.064063 118.468107 \nL 125.0125 118.289377 \nL 121.960938 118.104147 \nL 118.909375 117.912418 \nL 115.857813 117.71419 \nL 113.96875 117.587454 \nL 112.80625 117.505463 \nL 109.754688 117.283404 \nL 106.703125 117.054513 \nL 103.651563 116.818789 \nL 100.6 116.576232 \nL 97.548438 116.326843 \nL 94.496875 116.070621 \nL 91.445313 115.807567 \nL 88.39375 115.53768 \nL 85.342188 115.260961 \nL 82.290625 114.977409 \nL 81.716213 114.922748 \nL 79.239063 114.674282 \nL 76.1875 114.360999 \nL 73.135938 114.040514 \nL 70.084375 113.712828 \nL 67.032813 113.377939 \nL 63.98125 113.035848 \nL 60.929688 112.686556 \nL 57.878125 112.330061 \nL 57.273855 112.258042 \nL 54.826563 111.949698 \nL 51.775 111.557605 \nL 48.723438 111.157899 \nL 45.671875 110.75058 \nL 42.620313 110.335647 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#p09a7607aa4)\" d=\"M 42.620313 18.251025 \nL 45.671875 17.836093 \nL 48.723438 17.428773 \nL 51.775 17.029067 \nL 54.826563 16.636975 \nL 57.273855 16.328631 \nL 57.878125 16.256611 \nL 60.929688 15.900117 \nL 63.98125 15.550824 \nL 67.032813 15.208734 \nL 70.084375 14.873845 \nL 73.135938 14.546158 \nL 76.1875 14.225673 \nL 79.239063 13.91239 \nL 81.716213 13.663925 \nL 82.290625 13.609264 \nL 85.342188 13.325712 \nL 88.39375 13.048993 \nL 91.445313 12.779106 \nL 94.496875 12.516051 \nL 97.548438 12.25983 \nL 100.6 12.01044 \nL 103.651563 11.767884 \nL 106.703125 11.53216 \nL 109.754688 11.303269 \nL 112.80625 11.08121 \nL 113.96875 10.999219 \nL 115.857813 10.872483 \nL 118.909375 10.674255 \nL 121.960938 10.482526 \nL 125.0125 10.297296 \nL 128.064063 10.118566 \nL 131.115625 9.946335 \nL 134.167188 9.780603 \nL 137.21875 9.621371 \nL 140.270313 9.468638 \nL 143.321875 9.322404 \nL 146.373438 9.182669 \nL 149.425 9.049434 \nL 152.476563 8.922698 \nL 155.528125 8.802461 \nL 158.579688 8.688724 \nL 161.63125 8.581486 \nL 164.682813 8.480747 \nL 167.734375 8.386507 \nL 169.542708 8.334513 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_5\">\n    <path clip-path=\"url(#p09a7607aa4)\" d=\"M 237.920313 129.331194 \nL 234.86875 129.377418 \nL 231.817188 129.418204 \nL 228.765625 129.453552 \nL 225.714063 129.483462 \nL 222.6625 129.507934 \nL 219.610938 129.526968 \nL 216.559375 129.540563 \nL 213.507813 129.548721 \nL 210.45625 129.55144 \nL 207.404688 129.548721 \nL 204.353125 129.540563 \nL 201.301563 129.526968 \nL 198.25 129.507934 \nL 195.198438 129.483462 \nL 192.146875 129.453552 \nL 189.095313 129.418204 \nL 186.04375 129.377418 \nL 182.992188 129.331194 \nL 179.940625 129.279531 \nL 176.889063 129.22243 \nL 173.8375 129.159891 \nL 170.785938 129.091914 \nL 167.734375 129.018498 \nL 164.682813 128.939645 \nL 161.63125 128.855353 \nL 158.579688 128.765623 \nL 155.528125 128.670455 \nL 152.476563 128.569849 \nL 149.425 128.463805 \nL 146.373438 128.352322 \nL 143.605741 128.246278 \nL 143.321875 128.234938 \nL 140.270313 128.107373 \nL 137.21875 127.974137 \nL 134.167188 127.835233 \nL 131.115625 127.690658 \nL 128.064063 127.540414 \nL 125.0125 127.3845 \nL 121.960938 127.222917 \nL 118.909375 127.055664 \nL 115.857813 126.882742 \nL 112.80625 126.70415 \nL 109.754688 126.519888 \nL 106.703125 126.329957 \nL 103.651563 126.134356 \nL 100.6 125.933086 \nL 97.548438 125.726146 \nL 95.473375 125.581572 \nL 94.496875 125.510513 \nL 91.445313 125.282532 \nL 88.39375 125.048631 \nL 85.342188 124.808807 \nL 82.290625 124.563062 \nL 79.239063 124.311395 \nL 76.1875 124.053807 \nL 73.135938 123.790297 \nL 70.084375 123.520866 \nL 67.032813 123.245513 \nL 63.98125 122.964238 \nL 63.477899 122.916866 \nL 60.929688 122.665888 \nL 57.878125 122.359137 \nL 54.826563 122.046189 \nL 51.775 121.727044 \nL 48.723438 121.401702 \nL 45.671875 121.070163 \nL 42.620313 120.732427 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_6\">\n    <path clip-path=\"url(#p09a7607aa4)\" d=\"M 237.920313 137.061609 \nL 234.86875 137.102791 \nL 231.817188 137.139128 \nL 228.765625 137.17062 \nL 225.714063 137.197267 \nL 222.6625 137.219069 \nL 219.610938 137.236026 \nL 216.559375 137.248139 \nL 213.507813 137.255406 \nL 210.45625 137.257828 \nL 207.404688 137.255406 \nL 204.353125 137.248139 \nL 201.301563 137.236026 \nL 198.25 137.219069 \nL 195.198438 137.197267 \nL 192.146875 137.17062 \nL 189.095313 137.139128 \nL 186.04375 137.102791 \nL 182.992188 137.061609 \nL 179.940625 137.015582 \nL 176.889063 136.964711 \nL 173.8375 136.908994 \nL 170.785938 136.848433 \nL 167.734375 136.783026 \nL 164.682813 136.712775 \nL 161.63125 136.637679 \nL 158.579688 136.557737 \nL 155.528125 136.472951 \nL 152.476563 136.38332 \nL 149.425 136.288844 \nL 147.936433 136.240395 \nL 146.373438 136.187604 \nL 143.321875 136.079507 \nL 140.270313 135.966383 \nL 137.21875 135.848231 \nL 134.167188 135.725051 \nL 131.115625 135.596844 \nL 128.064063 135.463608 \nL 125.0125 135.325345 \nL 121.960938 135.182054 \nL 118.909375 135.033736 \nL 115.857813 134.88039 \nL 112.80625 134.722016 \nL 109.754688 134.558614 \nL 106.703125 134.390184 \nL 103.651563 134.216727 \nL 100.6 134.038242 \nL 97.548438 133.854729 \nL 94.496875 133.666189 \nL 93.07017 133.575689 \nL 91.445313 133.468579 \nL 88.39375 133.262195 \nL 85.342188 133.050586 \nL 82.290625 132.833752 \nL 79.239063 132.611693 \nL 76.1875 132.384409 \nL 73.135938 132.1519 \nL 70.084375 131.914167 \nL 67.032813 131.671208 \nL 63.98125 131.423025 \nL 60.929688 131.169617 \nL 57.878125 130.910983 \nL 57.878125 130.910983 \nL 54.826563 130.636356 \nL 51.775 130.35629 \nL 48.723438 130.070785 \nL 45.671875 129.779843 \nL 42.620313 129.483462 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_7\">\n    <path clip-path=\"url(#p09a7607aa4)\" d=\"M 210.45625 144.234513 \nL 207.404688 144.232255 \nL 204.353125 144.22548 \nL 201.301563 144.214189 \nL 198.25 144.198381 \nL 195.198438 144.178057 \nL 192.146875 144.153217 \nL 189.095313 144.12386 \nL 186.04375 144.089986 \nL 182.992188 144.051597 \nL 179.940625 144.00869 \nL 176.889063 143.961268 \nL 173.8375 143.909328 \nL 170.785938 143.852873 \nL 167.734375 143.791901 \nL 164.682813 143.726412 \nL 161.63125 143.656407 \nL 158.579688 143.581886 \nL 155.528125 143.502848 \nL 152.476563 143.419294 \nL 149.425 143.331223 \nL 146.373438 143.238635 \nL 143.321875 143.141532 \nL 140.270313 143.039912 \nL 137.21875 142.933775 \nL 134.167188 142.823122 \nL 131.115625 142.707953 \nL 128.064063 142.588267 \nL 125.0125 142.464064 \nL 121.960938 142.335345 \nL 118.909375 142.20211 \nL 115.857813 142.064358 \nL 112.80625 141.92209 \nL 109.754688 141.775305 \nL 106.703125 141.624004 \nL 105.641712 141.569807 \nL 103.651563 141.464621 \nL 100.6 141.298661 \nL 97.548438 141.128027 \nL 94.496875 140.952717 \nL 91.445313 140.772733 \nL 88.39375 140.588073 \nL 85.342188 140.398739 \nL 82.290625 140.20473 \nL 79.239063 140.006045 \nL 76.1875 139.802686 \nL 73.135938 139.594652 \nL 70.084375 139.381943 \nL 67.032813 139.164559 \nL 63.98125 138.9425 \nL 63.477899 138.905101 \nL 60.929688 138.708882 \nL 57.878125 138.469058 \nL 54.826563 138.22439 \nL 51.775 137.974877 \nL 48.723438 137.720518 \nL 45.671875 137.461315 \nL 42.620313 137.197267 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#p09a7607aa4)\" d=\"M 237.920313 144.051597 \nL 234.86875 144.089986 \nL 231.817188 144.12386 \nL 228.765625 144.153217 \nL 225.714063 144.178057 \nL 222.6625 144.198381 \nL 219.610938 144.214189 \nL 216.559375 144.22548 \nL 213.507813 144.232255 \nL 210.45625 144.234513 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_8\">\n    <path clip-path=\"url(#p09a7607aa4)\" d=\"M 43.320212 144.234513 \nL 42.620313 144.178057 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_9\"/>\n   <g id=\"line2d_10\">\n    <path clip-path=\"url(#p09a7607aa4)\" d=\"M 57.878125 117.587454 \nL 70.084375 32.316866 \nL 81.314125 83.479219 \nL 91.645495 52.781807 \nL 101.150355 71.200254 \nL 109.894827 60.149186 \nL 117.939741 66.779827 \nL 125.341062 62.801442 \nL 132.150277 65.188473 \nL 138.414754 63.756254 \nL 144.178074 64.615586 \nL 149.480328 64.099987 \nL 154.358402 64.409346 \nL 158.84623 64.223731 \nL 162.975031 64.3351 \nL 166.773529 64.268278 \nL 170.268147 64.308371 \nL 173.483195 64.284315 \nL 176.441039 64.298749 \nL 179.162256 64.290089 \nL 181.665776 64.295285 \n\" style=\"fill:none;stroke:#ff7f0e;stroke-linecap:square;stroke-width:1.5;\"/>\n    <defs>\n     <path d=\"M 0 3 \nC 0.795609 3 1.55874 2.683901 2.12132 2.12132 \nC 2.683901 1.55874 3 0.795609 3 0 \nC 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \nC 1.55874 -2.683901 0.795609 -3 0 -3 \nC -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \nC -2.683901 -1.55874 -3 -0.795609 -3 0 \nC -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \nC -1.55874 2.683901 -0.795609 3 0 3 \nz\n\" id=\"m4946e53586\" style=\"stroke:#ff7f0e;\"/>\n    </defs>\n    <g clip-path=\"url(#p09a7607aa4)\">\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"57.878125\" xlink:href=\"#m4946e53586\" y=\"117.587454\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"70.084375\" xlink:href=\"#m4946e53586\" y=\"32.316866\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"81.314125\" xlink:href=\"#m4946e53586\" y=\"83.479219\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"91.645495\" xlink:href=\"#m4946e53586\" y=\"52.781807\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"101.150355\" xlink:href=\"#m4946e53586\" y=\"71.200254\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"109.894827\" xlink:href=\"#m4946e53586\" y=\"60.149186\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"117.939741\" xlink:href=\"#m4946e53586\" y=\"66.779827\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"125.341062\" xlink:href=\"#m4946e53586\" y=\"62.801442\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"132.150277\" xlink:href=\"#m4946e53586\" y=\"65.188473\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"138.414754\" xlink:href=\"#m4946e53586\" y=\"63.756254\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"144.178074\" xlink:href=\"#m4946e53586\" y=\"64.615586\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"149.480328\" xlink:href=\"#m4946e53586\" y=\"64.099987\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"154.358402\" xlink:href=\"#m4946e53586\" y=\"64.409346\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"158.84623\" xlink:href=\"#m4946e53586\" y=\"64.223731\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"162.975031\" xlink:href=\"#m4946e53586\" y=\"64.3351\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"166.773529\" xlink:href=\"#m4946e53586\" y=\"64.268278\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"170.268147\" xlink:href=\"#m4946e53586\" y=\"64.308371\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"173.483195\" xlink:href=\"#m4946e53586\" y=\"64.284315\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"176.441039\" xlink:href=\"#m4946e53586\" y=\"64.298749\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"179.162256\" xlink:href=\"#m4946e53586\" y=\"64.290089\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"181.665776\" xlink:href=\"#m4946e53586\" y=\"64.295285\"/>\n    </g>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 42.620312 144.234513 \nL 42.620312 8.334513 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 237.920313 144.234513 \nL 237.920313 8.334513 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 42.620313 144.234513 \nL 237.920313 144.234513 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 42.620313 8.334513 \nL 237.920313 8.334513 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p09a7607aa4\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"42.620312\" y=\"8.334513\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "6hK3m8VrKHB4",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "60ef760a-b4e1-4d2e-8861-8b2e35aad2e1"
      },
      "source": [
        "eta = 0.6 \n",
        "d2l.show_trace_2d(f_2d, d2l.train_2d(gd_2d))"
      ],
      "execution_count": 27,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "epoch 20, x1 -0.387814, x2 -1673.365109\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 264.207813 180.65625\" width=\"264.207813pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 264.207813 180.65625 \nL 264.207813 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 61.707813 143.1 \nL 257.007812 143.1 \nL 257.007812 7.2 \nL 61.707813 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"meee15fd832\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"107.48125\" xlink:href=\"#meee15fd832\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- −4 -->\n      <defs>\n       <path d=\"M 10.59375 35.5 \nL 73.1875 35.5 \nL 73.1875 27.203125 \nL 10.59375 27.203125 \nz\n\" id=\"DejaVuSans-8722\"/>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(100.110156 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-52\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"168.5125\" xlink:href=\"#meee15fd832\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- −2 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(161.141406 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"229.54375\" xlink:href=\"#meee15fd832\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n      </defs>\n      <g transform=\"translate(226.3625 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_4\">\n     <!-- x1 -->\n     <defs>\n      <path d=\"M 54.890625 54.6875 \nL 35.109375 28.078125 \nL 55.90625 0 \nL 45.3125 0 \nL 29.390625 21.484375 \nL 13.484375 0 \nL 2.875 0 \nL 24.125 28.609375 \nL 4.6875 54.6875 \nL 15.28125 54.6875 \nL 29.78125 35.203125 \nL 44.28125 54.6875 \nz\n\" id=\"DejaVuSans-120\"/>\n      <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n     </defs>\n     <g transform=\"translate(153.217188 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-49\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_4\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m43ae20f6f7\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"61.707813\" xlink:href=\"#m43ae20f6f7\" y=\"134.845204\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- −1500 -->\n      <defs>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(20.878125 138.644422)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"147.412109\" xlink:href=\"#DejaVuSans-53\"/>\n       <use x=\"211.035156\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"274.658203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"61.707813\" xlink:href=\"#m43ae20f6f7\" y=\"111.174194\"/>\n      </g>\n     </g>\n     <g id=\"text_6\">\n      <!-- −1000 -->\n      <g transform=\"translate(20.878125 114.973413)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"147.412109\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"211.035156\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"274.658203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_6\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"61.707813\" xlink:href=\"#m43ae20f6f7\" y=\"87.503185\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- −500 -->\n      <g transform=\"translate(27.240625 91.302403)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-53\"/>\n       <use x=\"147.412109\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"211.035156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"61.707813\" xlink:href=\"#m43ae20f6f7\" y=\"63.832175\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0 -->\n      <g transform=\"translate(48.345313 67.631394)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"61.707813\" xlink:href=\"#m43ae20f6f7\" y=\"40.161166\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 500 -->\n      <g transform=\"translate(35.620312 43.960384)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-53\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"61.707813\" xlink:href=\"#m43ae20f6f7\" y=\"16.490156\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 1000 -->\n      <g transform=\"translate(29.257812 20.289375)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_11\">\n     <!-- x2 -->\n     <g transform=\"translate(14.798438 81.290625)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-50\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"LineCollection_1\"/>\n   <g id=\"LineCollection_2\">\n    <path clip-path=\"url(#pdc682a4e49)\" d=\"M 257.007812 93.773895 \nL 253.95625 93.773896 \nL 250.904688 93.773896 \nL 247.853125 93.773896 \nL 244.801563 93.773896 \nL 241.75 93.773897 \nL 238.698438 93.773897 \nL 235.646875 93.773897 \nL 232.595313 93.773897 \nL 229.54375 93.773897 \nL 226.492188 93.773897 \nL 223.440625 93.773897 \nL 220.389063 93.773897 \nL 217.3375 93.773897 \nL 214.285938 93.773896 \nL 211.234375 93.773896 \nL 208.182813 93.773896 \nL 205.13125 93.773896 \nL 202.079688 93.773895 \nL 199.028125 93.773895 \nL 195.976562 93.773895 \nL 192.925 93.773894 \nL 189.873438 93.773894 \nL 186.821875 93.773893 \nL 183.770313 93.773893 \nL 180.71875 93.773892 \nL 177.667188 93.773891 \nL 174.615625 93.773891 \nL 171.564063 93.77389 \nL 168.5125 93.773889 \nL 165.460938 93.773889 \nL 162.409375 93.773888 \nL 159.357813 93.773887 \nL 156.30625 93.773886 \nL 153.254688 93.773885 \nL 150.203125 93.773884 \nL 147.151563 93.773883 \nL 144.1 93.773882 \nL 141.048438 93.773881 \nL 137.996875 93.77388 \nL 134.945312 93.773879 \nL 131.89375 93.773878 \nL 128.842188 93.773877 \nL 125.790625 93.773875 \nL 122.739063 93.773874 \nL 119.6875 93.773873 \nL 116.635938 93.773871 \nL 113.584375 93.77387 \nL 110.532813 93.773868 \nL 107.48125 93.773867 \nL 104.429688 93.773865 \nL 101.378125 93.773864 \nL 98.326563 93.773862 \nL 95.275 93.773861 \nL 92.223438 93.773859 \nL 89.171875 93.773857 \nL 86.120313 93.773856 \nL 83.06875 93.773854 \nL 80.017188 93.773852 \nL 76.965625 93.77385 \nL 73.914062 93.773848 \nL 70.8625 93.773846 \nL 67.810937 93.773844 \nL 64.759375 93.773842 \nL 61.707813 93.77384 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pdc682a4e49)\" d=\"M 61.707813 33.89051 \nL 64.759375 33.890508 \nL 67.810937 33.890506 \nL 70.8625 33.890504 \nL 73.914062 33.890502 \nL 76.965625 33.8905 \nL 80.017188 33.890498 \nL 83.06875 33.890496 \nL 86.120313 33.890495 \nL 89.171875 33.890493 \nL 92.223438 33.890491 \nL 95.275 33.890489 \nL 98.326563 33.890488 \nL 101.378125 33.890486 \nL 104.429688 33.890485 \nL 107.48125 33.890483 \nL 110.532813 33.890482 \nL 113.584375 33.89048 \nL 116.635938 33.890479 \nL 119.6875 33.890478 \nL 122.739063 33.890476 \nL 125.790625 33.890475 \nL 128.842188 33.890474 \nL 131.89375 33.890472 \nL 134.945312 33.890471 \nL 137.996875 33.89047 \nL 141.048438 33.890469 \nL 144.1 33.890468 \nL 147.151563 33.890467 \nL 150.203125 33.890466 \nL 153.254688 33.890465 \nL 156.30625 33.890464 \nL 159.357813 33.890463 \nL 162.409375 33.890462 \nL 165.460938 33.890462 \nL 168.5125 33.890461 \nL 171.564063 33.89046 \nL 174.615625 33.890459 \nL 177.667188 33.890459 \nL 180.71875 33.890458 \nL 183.770313 33.890457 \nL 186.821875 33.890457 \nL 189.873438 33.890456 \nL 192.925 33.890456 \nL 195.976562 33.890456 \nL 199.028125 33.890455 \nL 202.079688 33.890455 \nL 205.13125 33.890454 \nL 208.182813 33.890454 \nL 211.234375 33.890454 \nL 214.285938 33.890454 \nL 217.3375 33.890454 \nL 220.389063 33.890453 \nL 223.440625 33.890453 \nL 226.492188 33.890453 \nL 229.54375 33.890453 \nL 232.595313 33.890453 \nL 235.646875 33.890453 \nL 238.698438 33.890453 \nL 241.75 33.890454 \nL 244.801563 33.890454 \nL 247.853125 33.890454 \nL 250.904688 33.890454 \nL 253.95625 33.890454 \nL 257.007812 33.890455 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_3\">\n    <path clip-path=\"url(#pdc682a4e49)\" d=\"M 257.007812 106.176163 \nL 253.95625 106.176163 \nL 250.904688 106.176164 \nL 247.853125 106.176164 \nL 244.801563 106.176164 \nL 241.75 106.176164 \nL 238.698438 106.176164 \nL 235.646875 106.176164 \nL 232.595313 106.176164 \nL 229.54375 106.176164 \nL 226.492188 106.176164 \nL 223.440625 106.176164 \nL 220.389063 106.176164 \nL 217.3375 106.176164 \nL 214.285938 106.176164 \nL 211.234375 106.176164 \nL 208.182813 106.176164 \nL 205.13125 106.176163 \nL 202.079688 106.176163 \nL 199.028125 106.176163 \nL 195.976562 106.176163 \nL 192.925 106.176162 \nL 189.873438 106.176162 \nL 186.821875 106.176162 \nL 183.770313 106.176161 \nL 180.71875 106.176161 \nL 177.667188 106.17616 \nL 174.615625 106.17616 \nL 171.564063 106.176159 \nL 168.5125 106.176159 \nL 165.460938 106.176158 \nL 162.409375 106.176158 \nL 159.357813 106.176157 \nL 156.30625 106.176157 \nL 153.254688 106.176156 \nL 150.203125 106.176155 \nL 147.151563 106.176155 \nL 144.1 106.176154 \nL 141.048438 106.176153 \nL 137.996875 106.176152 \nL 134.945312 106.176151 \nL 131.89375 106.176151 \nL 128.842188 106.17615 \nL 125.790625 106.176149 \nL 122.739063 106.176148 \nL 119.6875 106.176147 \nL 116.635938 106.176146 \nL 113.584375 106.176145 \nL 110.532813 106.176144 \nL 107.48125 106.176143 \nL 104.429688 106.176142 \nL 101.378125 106.176141 \nL 98.326563 106.17614 \nL 95.275 106.176139 \nL 92.223438 106.176137 \nL 89.171875 106.176136 \nL 86.120313 106.176135 \nL 83.06875 106.176134 \nL 80.017188 106.176132 \nL 76.965625 106.176131 \nL 73.914062 106.17613 \nL 70.8625 106.176128 \nL 67.810937 106.176127 \nL 64.759375 106.176126 \nL 61.707813 106.176124 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pdc682a4e49)\" d=\"M 61.707813 21.488226 \nL 64.759375 21.488225 \nL 67.810938 21.488223 \nL 70.8625 21.488222 \nL 73.914062 21.48822 \nL 76.965625 21.488219 \nL 80.017188 21.488218 \nL 83.06875 21.488216 \nL 86.120313 21.488215 \nL 89.171875 21.488214 \nL 92.223438 21.488213 \nL 95.275 21.488212 \nL 98.326563 21.48821 \nL 101.378125 21.488209 \nL 104.429688 21.488208 \nL 107.48125 21.488207 \nL 110.532813 21.488206 \nL 113.584375 21.488205 \nL 116.635938 21.488204 \nL 119.6875 21.488203 \nL 122.739063 21.488202 \nL 125.790625 21.488201 \nL 128.842188 21.4882 \nL 131.89375 21.488199 \nL 134.945312 21.488199 \nL 137.996875 21.488198 \nL 141.048438 21.488197 \nL 144.1 21.488196 \nL 147.151563 21.488196 \nL 150.203125 21.488195 \nL 153.254688 21.488194 \nL 156.30625 21.488194 \nL 159.357813 21.488193 \nL 162.409375 21.488192 \nL 165.460938 21.488192 \nL 168.5125 21.488191 \nL 171.564063 21.488191 \nL 174.615625 21.48819 \nL 177.667188 21.48819 \nL 180.71875 21.488189 \nL 183.770313 21.488189 \nL 186.821875 21.488189 \nL 189.873438 21.488188 \nL 192.925 21.488188 \nL 195.976562 21.488188 \nL 199.028125 21.488187 \nL 202.079688 21.488187 \nL 205.13125 21.488187 \nL 208.182813 21.488187 \nL 211.234375 21.488186 \nL 214.285938 21.488186 \nL 217.3375 21.488186 \nL 220.389063 21.488186 \nL 223.440625 21.488186 \nL 226.492188 21.488186 \nL 229.54375 21.488186 \nL 232.595313 21.488186 \nL 235.646875 21.488186 \nL 238.698438 21.488186 \nL 241.75 21.488186 \nL 244.801563 21.488186 \nL 247.853125 21.488186 \nL 250.904688 21.488187 \nL 253.95625 21.488187 \nL 257.007812 21.488187 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_4\">\n    <path clip-path=\"url(#pdc682a4e49)\" d=\"M 257.007812 115.692758 \nL 253.95625 115.692758 \nL 250.904688 115.692758 \nL 247.853125 115.692758 \nL 244.801563 115.692758 \nL 241.75 115.692758 \nL 238.698438 115.692758 \nL 235.646875 115.692759 \nL 232.595313 115.692759 \nL 229.54375 115.692759 \nL 226.492188 115.692759 \nL 223.440625 115.692759 \nL 220.389063 115.692758 \nL 217.3375 115.692758 \nL 214.285938 115.692758 \nL 211.234375 115.692758 \nL 208.182813 115.692758 \nL 205.13125 115.692758 \nL 202.079688 115.692758 \nL 199.028125 115.692758 \nL 195.976562 115.692757 \nL 192.925 115.692757 \nL 189.873438 115.692757 \nL 186.821875 115.692756 \nL 183.770313 115.692756 \nL 180.71875 115.692756 \nL 177.667188 115.692755 \nL 174.615625 115.692755 \nL 171.564063 115.692755 \nL 168.5125 115.692754 \nL 165.460938 115.692754 \nL 162.409375 115.692753 \nL 159.357813 115.692753 \nL 156.30625 115.692752 \nL 153.254688 115.692752 \nL 150.203125 115.692751 \nL 147.151563 115.692751 \nL 144.1 115.69275 \nL 141.048438 115.692749 \nL 137.996875 115.692749 \nL 134.945312 115.692748 \nL 131.89375 115.692748 \nL 128.842188 115.692747 \nL 125.790625 115.692746 \nL 122.739063 115.692745 \nL 119.6875 115.692745 \nL 116.635938 115.692744 \nL 113.584375 115.692743 \nL 110.532813 115.692742 \nL 107.48125 115.692741 \nL 104.429688 115.69274 \nL 101.378125 115.69274 \nL 98.326563 115.692739 \nL 95.275 115.692738 \nL 92.223438 115.692737 \nL 89.171875 115.692736 \nL 86.120313 115.692735 \nL 83.06875 115.692734 \nL 80.017188 115.692733 \nL 76.965625 115.692732 \nL 73.914062 115.69273 \nL 70.8625 115.692729 \nL 67.810937 115.692728 \nL 64.759375 115.692727 \nL 61.707813 115.692726 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pdc682a4e49)\" d=\"M 61.707813 11.971624 \nL 64.759375 11.971623 \nL 67.810937 11.971622 \nL 70.8625 11.971621 \nL 73.914062 11.97162 \nL 76.965625 11.971619 \nL 80.017188 11.971617 \nL 83.06875 11.971616 \nL 86.120313 11.971615 \nL 89.171875 11.971614 \nL 92.223438 11.971613 \nL 95.275 11.971612 \nL 98.326563 11.971612 \nL 101.378125 11.971611 \nL 104.429688 11.97161 \nL 107.48125 11.971609 \nL 110.532813 11.971608 \nL 113.584375 11.971607 \nL 116.635938 11.971606 \nL 119.6875 11.971606 \nL 122.739063 11.971605 \nL 125.790625 11.971604 \nL 128.842188 11.971603 \nL 131.89375 11.971603 \nL 134.945312 11.971602 \nL 137.996875 11.971601 \nL 141.048438 11.971601 \nL 144.1 11.9716 \nL 147.151563 11.971599 \nL 150.203125 11.971599 \nL 153.254688 11.971598 \nL 156.30625 11.971598 \nL 159.357813 11.971597 \nL 162.409375 11.971597 \nL 165.460938 11.971596 \nL 168.5125 11.971596 \nL 171.564063 11.971595 \nL 174.615625 11.971595 \nL 177.667188 11.971595 \nL 180.71875 11.971594 \nL 183.770313 11.971594 \nL 186.821875 11.971594 \nL 189.873438 11.971593 \nL 192.925 11.971593 \nL 195.976562 11.971593 \nL 199.028125 11.971593 \nL 202.079688 11.971592 \nL 205.13125 11.971592 \nL 208.182813 11.971592 \nL 211.234375 11.971592 \nL 214.285938 11.971592 \nL 217.3375 11.971592 \nL 220.389063 11.971592 \nL 223.440625 11.971592 \nL 226.492188 11.971592 \nL 229.54375 11.971592 \nL 232.595313 11.971592 \nL 235.646875 11.971592 \nL 238.698438 11.971592 \nL 241.75 11.971592 \nL 244.801563 11.971592 \nL 247.853125 11.971592 \nL 250.904688 11.971592 \nL 253.95625 11.971592 \nL 257.007812 11.971592 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_5\">\n    <path clip-path=\"url(#pdc682a4e49)\" d=\"M 257.007812 123.715618 \nL 253.95625 123.715618 \nL 250.904688 123.715618 \nL 247.853125 123.715618 \nL 244.801563 123.715619 \nL 241.75 123.715619 \nL 238.698438 123.715619 \nL 235.646875 123.715619 \nL 232.595313 123.715619 \nL 229.54375 123.715619 \nL 226.492188 123.715619 \nL 223.440625 123.715619 \nL 220.389063 123.715619 \nL 217.3375 123.715619 \nL 214.285938 123.715619 \nL 211.234375 123.715618 \nL 208.182813 123.715618 \nL 205.13125 123.715618 \nL 202.079688 123.715618 \nL 199.028125 123.715618 \nL 195.976562 123.715618 \nL 192.925 123.715617 \nL 189.873438 123.715617 \nL 186.821875 123.715617 \nL 183.770313 123.715617 \nL 180.71875 123.715616 \nL 177.667188 123.715616 \nL 174.615625 123.715616 \nL 171.564063 123.715615 \nL 168.5125 123.715615 \nL 165.460938 123.715615 \nL 162.409375 123.715614 \nL 159.357813 123.715614 \nL 156.30625 123.715613 \nL 153.254688 123.715613 \nL 150.203125 123.715612 \nL 147.151563 123.715612 \nL 144.1 123.715611 \nL 141.048438 123.715611 \nL 137.996875 123.71561 \nL 134.945312 123.71561 \nL 131.89375 123.715609 \nL 128.842188 123.715609 \nL 125.790625 123.715608 \nL 122.739063 123.715607 \nL 119.6875 123.715607 \nL 116.635938 123.715606 \nL 113.584375 123.715605 \nL 110.532813 123.715605 \nL 107.48125 123.715604 \nL 104.429688 123.715603 \nL 101.378125 123.715602 \nL 98.326563 123.715601 \nL 95.275 123.715601 \nL 92.223438 123.7156 \nL 89.171875 123.715599 \nL 86.120313 123.715598 \nL 83.06875 123.715597 \nL 80.017188 123.715596 \nL 76.965625 123.715595 \nL 73.914062 123.715594 \nL 70.8625 123.715593 \nL 67.810937 123.715592 \nL 64.759375 123.715591 \nL 61.707813 123.71559 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_6\">\n    <path clip-path=\"url(#pdc682a4e49)\" d=\"M 257.007812 130.7839 \nL 253.95625 130.7839 \nL 250.904688 130.7839 \nL 247.853125 130.7839 \nL 244.801563 130.7839 \nL 241.75 130.7839 \nL 238.698438 130.7839 \nL 235.646875 130.7839 \nL 232.595313 130.7839 \nL 229.54375 130.7839 \nL 226.492188 130.7839 \nL 223.440625 130.7839 \nL 220.389063 130.7839 \nL 217.3375 130.7839 \nL 214.285938 130.7839 \nL 211.234375 130.7839 \nL 208.182813 130.7839 \nL 205.13125 130.7839 \nL 202.079688 130.7839 \nL 199.028125 130.7839 \nL 195.976562 130.783899 \nL 192.925 130.783899 \nL 189.873438 130.783899 \nL 186.821875 130.783899 \nL 183.770313 130.783899 \nL 180.71875 130.783898 \nL 177.667188 130.783898 \nL 174.615625 130.783898 \nL 171.564063 130.783897 \nL 168.5125 130.783897 \nL 165.460938 130.783897 \nL 162.409375 130.783896 \nL 159.357813 130.783896 \nL 156.30625 130.783896 \nL 153.254688 130.783895 \nL 150.203125 130.783895 \nL 147.151563 130.783894 \nL 144.1 130.783894 \nL 141.048438 130.783893 \nL 137.996875 130.783893 \nL 134.945312 130.783892 \nL 131.89375 130.783892 \nL 128.842188 130.783891 \nL 125.790625 130.783891 \nL 122.739063 130.78389 \nL 119.6875 130.78389 \nL 116.635938 130.783889 \nL 113.584375 130.783888 \nL 110.532813 130.783888 \nL 107.48125 130.783887 \nL 104.429688 130.783886 \nL 101.378125 130.783886 \nL 98.326563 130.783885 \nL 95.275 130.783884 \nL 92.223438 130.783884 \nL 89.171875 130.783883 \nL 86.120313 130.783882 \nL 83.06875 130.783881 \nL 80.017188 130.78388 \nL 76.965625 130.78388 \nL 73.914062 130.783879 \nL 70.8625 130.783878 \nL 67.810937 130.783877 \nL 64.759375 130.783876 \nL 61.707813 130.783875 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_7\">\n    <path clip-path=\"url(#pdc682a4e49)\" d=\"M 257.007812 137.174115 \nL 253.95625 137.174115 \nL 250.904688 137.174115 \nL 247.853125 137.174115 \nL 244.801563 137.174115 \nL 241.75 137.174116 \nL 238.698438 137.174116 \nL 235.646875 137.174116 \nL 232.595313 137.174116 \nL 229.54375 137.174116 \nL 226.492188 137.174116 \nL 223.440625 137.174116 \nL 220.389063 137.174116 \nL 217.3375 137.174116 \nL 214.285938 137.174115 \nL 211.234375 137.174115 \nL 208.182813 137.174115 \nL 205.13125 137.174115 \nL 202.079688 137.174115 \nL 199.028125 137.174115 \nL 195.976562 137.174115 \nL 192.925 137.174115 \nL 189.873438 137.174114 \nL 186.821875 137.174114 \nL 183.770313 137.174114 \nL 180.71875 137.174114 \nL 177.667188 137.174113 \nL 174.615625 137.174113 \nL 171.564063 137.174113 \nL 168.5125 137.174113 \nL 165.460938 137.174112 \nL 162.409375 137.174112 \nL 159.357813 137.174112 \nL 156.30625 137.174111 \nL 153.254688 137.174111 \nL 150.203125 137.17411 \nL 147.151563 137.17411 \nL 144.1 137.17411 \nL 141.048438 137.174109 \nL 137.996875 137.174109 \nL 134.945312 137.174108 \nL 131.89375 137.174108 \nL 128.842188 137.174107 \nL 125.790625 137.174107 \nL 122.739063 137.174106 \nL 119.6875 137.174106 \nL 116.635938 137.174105 \nL 113.584375 137.174105 \nL 110.532813 137.174104 \nL 107.48125 137.174103 \nL 104.429688 137.174103 \nL 101.378125 137.174102 \nL 98.326563 137.174102 \nL 95.275 137.174101 \nL 92.223438 137.1741 \nL 89.171875 137.174099 \nL 86.120313 137.174099 \nL 83.06875 137.174098 \nL 80.017188 137.174097 \nL 76.965625 137.174097 \nL 73.914062 137.174096 \nL 70.8625 137.174095 \nL 67.810937 137.174094 \nL 64.759375 137.174093 \nL 61.707813 137.174093 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_8\">\n    <path clip-path=\"url(#pdc682a4e49)\" d=\"M 257.007812 143.050524 \nL 253.95625 143.050524 \nL 250.904688 143.050525 \nL 247.853125 143.050525 \nL 244.801563 143.050525 \nL 241.75 143.050525 \nL 238.698438 143.050525 \nL 235.646875 143.050525 \nL 232.595313 143.050525 \nL 229.54375 143.050525 \nL 226.492188 143.050525 \nL 223.440625 143.050525 \nL 220.389063 143.050525 \nL 217.3375 143.050525 \nL 214.285938 143.050525 \nL 211.234375 143.050525 \nL 208.182813 143.050525 \nL 205.13125 143.050524 \nL 202.079688 143.050524 \nL 199.028125 143.050524 \nL 195.976562 143.050524 \nL 192.925 143.050524 \nL 189.873438 143.050524 \nL 186.821875 143.050524 \nL 183.770313 143.050523 \nL 180.71875 143.050523 \nL 177.667188 143.050523 \nL 174.615625 143.050523 \nL 171.564063 143.050522 \nL 168.5125 143.050522 \nL 165.460938 143.050522 \nL 162.409375 143.050522 \nL 159.357813 143.050521 \nL 156.30625 143.050521 \nL 153.254688 143.050521 \nL 150.203125 143.05052 \nL 147.151563 143.05052 \nL 144.1 143.050519 \nL 141.048438 143.050519 \nL 137.996875 143.050519 \nL 134.945312 143.050518 \nL 131.89375 143.050518 \nL 128.842188 143.050517 \nL 125.790625 143.050517 \nL 122.739063 143.050516 \nL 119.6875 143.050516 \nL 116.635938 143.050515 \nL 113.584375 143.050515 \nL 110.532812 143.050514 \nL 107.48125 143.050514 \nL 104.429688 143.050513 \nL 101.378125 143.050512 \nL 98.326563 143.050512 \nL 95.275 143.050511 \nL 92.223438 143.050511 \nL 89.171875 143.05051 \nL 86.120313 143.050509 \nL 83.06875 143.050509 \nL 80.017188 143.050508 \nL 76.965625 143.050507 \nL 73.914062 143.050507 \nL 70.8625 143.050506 \nL 67.810937 143.050505 \nL 64.759375 143.050504 \nL 61.707813 143.050504 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_9\"/>\n   <g id=\"line2d_10\">\n    <path clip-path=\"url(#pdc682a4e49)\" d=\"M 76.965625 63.926859 \nL 95.275 63.699617 \nL 111.38725 64.017756 \nL 125.56603 63.572362 \nL 138.043356 64.195913 \nL 149.023404 63.322942 \nL 158.685845 64.545102 \nL 167.188794 62.834077 \nL 174.671389 65.229512 \nL 181.256072 61.875904 \nL 187.050593 66.570955 \nL 192.149772 59.997883 \nL 196.637049 69.200184 \nL 200.585853 56.316963 \nL 204.060801 74.353472 \nL 207.118755 49.10236 \nL 209.809754 84.453917 \nL 212.177834 34.961737 \nL 214.261744 104.250789 \nL 216.095585 7.246116 \nL 217.709364 143.052658 \n\" style=\"fill:none;stroke:#ff7f0e;stroke-linecap:square;stroke-width:1.5;\"/>\n    <defs>\n     <path d=\"M 0 3 \nC 0.795609 3 1.55874 2.683901 2.12132 2.12132 \nC 2.683901 1.55874 3 0.795609 3 0 \nC 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \nC 1.55874 -2.683901 0.795609 -3 0 -3 \nC -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \nC -2.683901 -1.55874 -3 -0.795609 -3 0 \nC -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \nC -1.55874 2.683901 -0.795609 3 0 3 \nz\n\" id=\"m289c76e394\" style=\"stroke:#ff7f0e;\"/>\n    </defs>\n    <g clip-path=\"url(#pdc682a4e49)\">\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"76.965625\" xlink:href=\"#m289c76e394\" y=\"63.926859\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"95.275\" xlink:href=\"#m289c76e394\" y=\"63.699617\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"111.38725\" xlink:href=\"#m289c76e394\" y=\"64.017756\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"125.56603\" xlink:href=\"#m289c76e394\" y=\"63.572362\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"138.043356\" xlink:href=\"#m289c76e394\" y=\"64.195913\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"149.023404\" xlink:href=\"#m289c76e394\" y=\"63.322942\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"158.685845\" xlink:href=\"#m289c76e394\" y=\"64.545102\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"167.188794\" xlink:href=\"#m289c76e394\" y=\"62.834077\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"174.671389\" xlink:href=\"#m289c76e394\" y=\"65.229512\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"181.256072\" xlink:href=\"#m289c76e394\" y=\"61.875904\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"187.050593\" xlink:href=\"#m289c76e394\" y=\"66.570955\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"192.149772\" xlink:href=\"#m289c76e394\" y=\"59.997883\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"196.637049\" xlink:href=\"#m289c76e394\" y=\"69.200184\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"200.585853\" xlink:href=\"#m289c76e394\" y=\"56.316963\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"204.060801\" xlink:href=\"#m289c76e394\" y=\"74.353472\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"207.118755\" xlink:href=\"#m289c76e394\" y=\"49.10236\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"209.809754\" xlink:href=\"#m289c76e394\" y=\"84.453917\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"212.177834\" xlink:href=\"#m289c76e394\" y=\"34.961737\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"214.261744\" xlink:href=\"#m289c76e394\" y=\"104.250789\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"216.095585\" xlink:href=\"#m289c76e394\" y=\"7.246116\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"217.709364\" xlink:href=\"#m289c76e394\" y=\"143.052658\"/>\n    </g>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 61.707813 143.1 \nL 61.707813 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 257.007812 143.1 \nL 257.007812 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 61.707813 143.1 \nL 257.007812 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 61.707813 7.2 \nL 257.007812 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"pdc682a4e49\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"61.707813\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "wzh1jvH0Kgb-",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 280
        },
        "outputId": "3235cfa8-5987-47e4-c587-fc3e84f83483"
      },
      "source": [
        "def momentum_2d(x1, x2, v1, v2):\n",
        "    v1 = gamma * v1 + eta * 0.2 * x1 \n",
        "    v2 = gamma * v2 + eta * 4 * x2 \n",
        "    return x1 - v1, x2 - v2, v1, v2 \n",
        "\n",
        "eta, gamma = 0.4, 0.5 \n",
        "d2l.show_trace_2d(f_2d, d2l.train_2d(momentum_2d))"
      ],
      "execution_count": 28,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "epoch 20, x1 -0.062843, x2 0.001202\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"181.790763pt\" version=\"1.1\" viewBox=\"0 0 245.120313 181.790763\" width=\"245.120313pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 181.790763 \nL 245.120313 181.790763 \nL 245.120313 -0 \nL 0 -0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 42.620312 144.234513 \nL 237.920313 144.234513 \nL 237.920313 8.334513 \nL 42.620312 8.334513 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m6ef6efb259\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"88.39375\" xlink:href=\"#m6ef6efb259\" y=\"144.234513\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- −4 -->\n      <defs>\n       <path d=\"M 10.59375 35.5 \nL 73.1875 35.5 \nL 73.1875 27.203125 \nL 10.59375 27.203125 \nz\n\" id=\"DejaVuSans-8722\"/>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(81.022656 158.83295)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-52\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"149.425\" xlink:href=\"#m6ef6efb259\" y=\"144.234513\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- −2 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(142.053906 158.83295)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"210.45625\" xlink:href=\"#m6ef6efb259\" y=\"144.234513\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n      </defs>\n      <g transform=\"translate(207.275 158.83295)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_4\">\n     <!-- x1 -->\n     <defs>\n      <path d=\"M 54.890625 54.6875 \nL 35.109375 28.078125 \nL 55.90625 0 \nL 45.3125 0 \nL 29.390625 21.484375 \nL 13.484375 0 \nL 2.875 0 \nL 24.125 28.609375 \nL 4.6875 54.6875 \nL 15.28125 54.6875 \nL 29.78125 35.203125 \nL 44.28125 54.6875 \nz\n\" id=\"DejaVuSans-120\"/>\n      <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n     </defs>\n     <g transform=\"translate(134.129687 172.511075)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-49\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_4\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m7ac82f2006\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m7ac82f2006\" y=\"144.234513\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- −3 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 148.033732)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-51\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m7ac82f2006\" y=\"117.587454\"/>\n      </g>\n     </g>\n     <g id=\"text_6\">\n      <!-- −2 -->\n      <g transform=\"translate(20.878125 121.386673)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_6\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m7ac82f2006\" y=\"90.940395\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- −1 -->\n      <g transform=\"translate(20.878125 94.739614)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-49\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m7ac82f2006\" y=\"64.293336\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0 -->\n      <g transform=\"translate(29.257812 68.092555)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m7ac82f2006\" y=\"37.646278\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 1 -->\n      <g transform=\"translate(29.257812 41.445496)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m7ac82f2006\" y=\"10.999219\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 2 -->\n      <g transform=\"translate(29.257812 14.798437)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_11\">\n     <!-- x2 -->\n     <g transform=\"translate(14.798437 82.425138)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-50\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"LineCollection_1\"/>\n   <g id=\"LineCollection_2\">\n    <path clip-path=\"url(#pb820d04d53)\" d=\"M 237.920313 96.477654 \nL 222.6625 96.824066 \nL 207.404688 96.904007 \nL 192.146875 96.717478 \nL 176.889063 96.264014 \nL 164.682813 95.661559 \nL 152.476563 94.873733 \nL 140.270313 93.900536 \nL 131.115625 92.996025 \nL 118.909375 91.574849 \nL 109.754688 90.316293 \nL 97.100875 88.275689 \nL 85.342188 85.916641 \nL 82.290625 85.22016 \nL 73.135938 82.895033 \nL 63.98125 79.990877 \nL 57.878125 77.616866 \nL 52.486044 74.95216 \nL 48.409725 72.287454 \nL 45.559891 69.622748 \nL 43.880132 66.958042 \nL 43.320212 64.293336 \nL 43.880132 61.628631 \nL 45.671875 58.857336 \nL 48.723438 56.089849 \nL 52.486044 53.634513 \nL 57.878125 50.969807 \nL 64.752171 48.305101 \nL 73.307374 45.640395 \nL 83.908321 42.975689 \nL 94.496875 40.812575 \nL 100.6 39.721943 \nL 113.96875 37.646278 \nL 125.0125 36.275857 \nL 137.21875 34.9584 \nL 149.425 33.938861 \nL 161.63125 33.104692 \nL 173.8375 32.455894 \nL 186.04375 32.018419 \nL 201.301563 31.725301 \nL 216.559375 31.698654 \nL 231.817188 31.938478 \nL 237.920313 32.109019 \nL 237.920313 32.109019 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_3\">\n    <path clip-path=\"url(#pb820d04d53)\" d=\"M 237.920313 110.122471 \nL 234.86875 110.187185 \nL 231.817188 110.244286 \nL 228.765625 110.293773 \nL 225.714063 110.335647 \nL 222.6625 110.369908 \nL 219.610938 110.396555 \nL 216.559375 110.415588 \nL 213.507813 110.427009 \nL 210.45625 110.430815 \nL 207.404688 110.427009 \nL 204.353125 110.415588 \nL 201.301563 110.396555 \nL 198.25 110.369908 \nL 195.198438 110.335647 \nL 192.146875 110.293773 \nL 189.095313 110.244286 \nL 186.04375 110.187185 \nL 182.992188 110.122471 \nL 179.940625 110.050143 \nL 176.889063 109.970202 \nL 173.8375 109.882647 \nL 170.785938 109.787479 \nL 167.734375 109.684698 \nL 165.208944 109.593336 \nL 164.682813 109.573149 \nL 161.63125 109.447989 \nL 158.579688 109.314754 \nL 155.528125 109.173443 \nL 152.476563 109.024058 \nL 149.425 108.866598 \nL 146.373438 108.701064 \nL 143.321875 108.527454 \nL 140.270313 108.34577 \nL 137.21875 108.15601 \nL 134.167188 107.958176 \nL 131.115625 107.752267 \nL 128.064063 107.538283 \nL 125.0125 107.316224 \nL 121.960938 107.08609 \nL 119.943803 106.928631 \nL 118.909375 106.842672 \nL 115.857813 106.5805 \nL 112.80625 106.309731 \nL 109.754688 106.030367 \nL 106.703125 105.742407 \nL 103.651563 105.445851 \nL 100.6 105.140699 \nL 97.548438 104.826951 \nL 94.496875 104.504608 \nL 92.277557 104.263925 \nL 91.445313 104.167444 \nL 88.39375 103.804493 \nL 85.342188 103.432353 \nL 82.290625 103.051024 \nL 79.239063 102.660507 \nL 76.1875 102.260801 \nL 73.135938 101.851906 \nL 71.291587 101.599219 \nL 70.084375 101.421572 \nL 67.032813 100.96265 \nL 63.98125 100.493859 \nL 60.929688 100.015199 \nL 57.878125 99.52667 \nL 54.826563 99.028271 \nL 54.263653 98.934513 \nL 51.775 98.486842 \nL 48.723438 97.927254 \nL 45.671875 97.357007 \nL 42.620313 96.776101 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pb820d04d53)\" d=\"M 42.620313 31.810572 \nL 45.671875 31.229666 \nL 48.723438 30.659419 \nL 51.775 30.099831 \nL 54.263653 29.65216 \nL 54.826563 29.558402 \nL 57.878125 29.060003 \nL 60.929688 28.571474 \nL 63.98125 28.092814 \nL 67.032813 27.624023 \nL 70.084375 27.165101 \nL 71.291587 26.987454 \nL 73.135938 26.734766 \nL 76.1875 26.325872 \nL 79.239063 25.926166 \nL 82.290625 25.535649 \nL 85.342188 25.15432 \nL 88.39375 24.78218 \nL 91.445313 24.419229 \nL 92.277557 24.322748 \nL 94.496875 24.082065 \nL 97.548438 23.759722 \nL 100.6 23.445974 \nL 103.651563 23.140822 \nL 106.703125 22.844266 \nL 109.754688 22.556306 \nL 112.80625 22.276942 \nL 115.857813 22.006173 \nL 118.909375 21.744001 \nL 119.943803 21.658042 \nL 121.960938 21.500582 \nL 125.0125 21.270449 \nL 128.064063 21.04839 \nL 131.115625 20.834406 \nL 134.167188 20.628497 \nL 137.21875 20.430663 \nL 140.270313 20.240903 \nL 143.321875 20.059219 \nL 146.373438 19.885609 \nL 149.425 19.720074 \nL 152.476563 19.562614 \nL 155.528125 19.413229 \nL 158.579688 19.271919 \nL 161.63125 19.138684 \nL 164.682813 19.013524 \nL 165.208944 18.993336 \nL 167.734375 18.901975 \nL 170.785938 18.799194 \nL 173.8375 18.704025 \nL 176.889063 18.616471 \nL 179.940625 18.53653 \nL 182.992188 18.464202 \nL 186.04375 18.399488 \nL 189.095313 18.342387 \nL 192.146875 18.292899 \nL 195.198438 18.251025 \nL 198.25 18.216765 \nL 201.301563 18.190118 \nL 204.353125 18.171084 \nL 207.404688 18.159664 \nL 210.45625 18.155857 \nL 213.507813 18.159664 \nL 216.559375 18.171084 \nL 219.610938 18.190118 \nL 222.6625 18.216765 \nL 225.714063 18.251025 \nL 228.765625 18.292899 \nL 231.817188 18.342387 \nL 234.86875 18.399488 \nL 237.920313 18.464202 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_4\">\n    <path clip-path=\"url(#pb820d04d53)\" d=\"M 237.920313 120.558911 \nL 234.86875 120.611585 \nL 231.817188 120.658063 \nL 228.765625 120.698343 \nL 225.714063 120.732427 \nL 222.6625 120.760313 \nL 219.610938 120.782003 \nL 216.559375 120.797495 \nL 213.507813 120.806791 \nL 210.45625 120.809889 \nL 207.404688 120.806791 \nL 204.353125 120.797495 \nL 201.301563 120.782003 \nL 198.25 120.760313 \nL 195.198438 120.732427 \nL 192.146875 120.698343 \nL 189.095313 120.658063 \nL 186.04375 120.611585 \nL 182.992188 120.558911 \nL 179.940625 120.50004 \nL 176.889063 120.434971 \nL 173.8375 120.363706 \nL 170.785938 120.286243 \nL 169.542708 120.25216 \nL 167.734375 120.200166 \nL 164.682813 120.105926 \nL 161.63125 120.005187 \nL 158.579688 119.897949 \nL 155.528125 119.784212 \nL 152.476563 119.663975 \nL 149.425 119.537239 \nL 146.373438 119.404004 \nL 143.321875 119.264269 \nL 140.270313 119.118035 \nL 137.21875 118.965302 \nL 134.167188 118.80607 \nL 131.115625 118.640338 \nL 128.064063 118.468107 \nL 125.0125 118.289377 \nL 121.960938 118.104147 \nL 118.909375 117.912418 \nL 115.857813 117.71419 \nL 113.96875 117.587454 \nL 112.80625 117.505463 \nL 109.754688 117.283404 \nL 106.703125 117.054513 \nL 103.651563 116.818789 \nL 100.6 116.576232 \nL 97.548438 116.326843 \nL 94.496875 116.070621 \nL 91.445313 115.807567 \nL 88.39375 115.53768 \nL 85.342188 115.260961 \nL 82.290625 114.977409 \nL 81.716213 114.922748 \nL 79.239063 114.674282 \nL 76.1875 114.360999 \nL 73.135938 114.040514 \nL 70.084375 113.712828 \nL 67.032813 113.377939 \nL 63.98125 113.035848 \nL 60.929688 112.686556 \nL 57.878125 112.330061 \nL 57.273855 112.258042 \nL 54.826563 111.949698 \nL 51.775 111.557605 \nL 48.723438 111.157899 \nL 45.671875 110.75058 \nL 42.620313 110.335647 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pb820d04d53)\" d=\"M 42.620313 18.251025 \nL 45.671875 17.836093 \nL 48.723438 17.428773 \nL 51.775 17.029067 \nL 54.826563 16.636975 \nL 57.273855 16.328631 \nL 57.878125 16.256611 \nL 60.929688 15.900117 \nL 63.98125 15.550824 \nL 67.032813 15.208734 \nL 70.084375 14.873845 \nL 73.135938 14.546158 \nL 76.1875 14.225673 \nL 79.239063 13.91239 \nL 81.716213 13.663925 \nL 82.290625 13.609264 \nL 85.342188 13.325712 \nL 88.39375 13.048993 \nL 91.445313 12.779106 \nL 94.496875 12.516051 \nL 97.548438 12.25983 \nL 100.6 12.01044 \nL 103.651563 11.767884 \nL 106.703125 11.53216 \nL 109.754688 11.303269 \nL 112.80625 11.08121 \nL 113.96875 10.999219 \nL 115.857813 10.872483 \nL 118.909375 10.674255 \nL 121.960938 10.482526 \nL 125.0125 10.297296 \nL 128.064063 10.118566 \nL 131.115625 9.946335 \nL 134.167188 9.780603 \nL 137.21875 9.621371 \nL 140.270313 9.468638 \nL 143.321875 9.322404 \nL 146.373438 9.182669 \nL 149.425 9.049434 \nL 152.476563 8.922698 \nL 155.528125 8.802461 \nL 158.579688 8.688724 \nL 161.63125 8.581486 \nL 164.682813 8.480747 \nL 167.734375 8.386507 \nL 169.542708 8.334513 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_5\">\n    <path clip-path=\"url(#pb820d04d53)\" d=\"M 237.920313 129.331194 \nL 234.86875 129.377418 \nL 231.817188 129.418204 \nL 228.765625 129.453552 \nL 225.714063 129.483462 \nL 222.6625 129.507934 \nL 219.610938 129.526968 \nL 216.559375 129.540563 \nL 213.507813 129.548721 \nL 210.45625 129.55144 \nL 207.404688 129.548721 \nL 204.353125 129.540563 \nL 201.301563 129.526968 \nL 198.25 129.507934 \nL 195.198438 129.483462 \nL 192.146875 129.453552 \nL 189.095313 129.418204 \nL 186.04375 129.377418 \nL 182.992188 129.331194 \nL 179.940625 129.279531 \nL 176.889063 129.22243 \nL 173.8375 129.159891 \nL 170.785938 129.091914 \nL 167.734375 129.018498 \nL 164.682813 128.939645 \nL 161.63125 128.855353 \nL 158.579688 128.765623 \nL 155.528125 128.670455 \nL 152.476563 128.569849 \nL 149.425 128.463805 \nL 146.373438 128.352322 \nL 143.605741 128.246278 \nL 143.321875 128.234938 \nL 140.270313 128.107373 \nL 137.21875 127.974137 \nL 134.167188 127.835233 \nL 131.115625 127.690658 \nL 128.064063 127.540414 \nL 125.0125 127.3845 \nL 121.960938 127.222917 \nL 118.909375 127.055664 \nL 115.857813 126.882742 \nL 112.80625 126.70415 \nL 109.754688 126.519888 \nL 106.703125 126.329957 \nL 103.651563 126.134356 \nL 100.6 125.933086 \nL 97.548438 125.726146 \nL 95.473375 125.581572 \nL 94.496875 125.510513 \nL 91.445313 125.282532 \nL 88.39375 125.048631 \nL 85.342188 124.808807 \nL 82.290625 124.563062 \nL 79.239063 124.311395 \nL 76.1875 124.053807 \nL 73.135938 123.790297 \nL 70.084375 123.520866 \nL 67.032813 123.245513 \nL 63.98125 122.964238 \nL 63.477899 122.916866 \nL 60.929688 122.665888 \nL 57.878125 122.359137 \nL 54.826563 122.046189 \nL 51.775 121.727044 \nL 48.723438 121.401702 \nL 45.671875 121.070163 \nL 42.620313 120.732427 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_6\">\n    <path clip-path=\"url(#pb820d04d53)\" d=\"M 237.920313 137.061609 \nL 234.86875 137.102791 \nL 231.817188 137.139128 \nL 228.765625 137.17062 \nL 225.714063 137.197267 \nL 222.6625 137.219069 \nL 219.610938 137.236026 \nL 216.559375 137.248139 \nL 213.507813 137.255406 \nL 210.45625 137.257828 \nL 207.404688 137.255406 \nL 204.353125 137.248139 \nL 201.301563 137.236026 \nL 198.25 137.219069 \nL 195.198438 137.197267 \nL 192.146875 137.17062 \nL 189.095313 137.139128 \nL 186.04375 137.102791 \nL 182.992188 137.061609 \nL 179.940625 137.015582 \nL 176.889063 136.964711 \nL 173.8375 136.908994 \nL 170.785938 136.848433 \nL 167.734375 136.783026 \nL 164.682813 136.712775 \nL 161.63125 136.637679 \nL 158.579688 136.557737 \nL 155.528125 136.472951 \nL 152.476563 136.38332 \nL 149.425 136.288844 \nL 147.936433 136.240395 \nL 146.373438 136.187604 \nL 143.321875 136.079507 \nL 140.270313 135.966383 \nL 137.21875 135.848231 \nL 134.167188 135.725051 \nL 131.115625 135.596844 \nL 128.064063 135.463608 \nL 125.0125 135.325345 \nL 121.960938 135.182054 \nL 118.909375 135.033736 \nL 115.857813 134.88039 \nL 112.80625 134.722016 \nL 109.754688 134.558614 \nL 106.703125 134.390184 \nL 103.651563 134.216727 \nL 100.6 134.038242 \nL 97.548438 133.854729 \nL 94.496875 133.666189 \nL 93.07017 133.575689 \nL 91.445313 133.468579 \nL 88.39375 133.262195 \nL 85.342188 133.050586 \nL 82.290625 132.833752 \nL 79.239063 132.611693 \nL 76.1875 132.384409 \nL 73.135938 132.1519 \nL 70.084375 131.914167 \nL 67.032813 131.671208 \nL 63.98125 131.423025 \nL 60.929688 131.169617 \nL 57.878125 130.910983 \nL 57.878125 130.910983 \nL 54.826563 130.636356 \nL 51.775 130.35629 \nL 48.723438 130.070785 \nL 45.671875 129.779843 \nL 42.620313 129.483462 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_7\">\n    <path clip-path=\"url(#pb820d04d53)\" d=\"M 210.45625 144.234513 \nL 207.404688 144.232255 \nL 204.353125 144.22548 \nL 201.301563 144.214189 \nL 198.25 144.198381 \nL 195.198438 144.178057 \nL 192.146875 144.153217 \nL 189.095313 144.12386 \nL 186.04375 144.089986 \nL 182.992188 144.051597 \nL 179.940625 144.00869 \nL 176.889063 143.961268 \nL 173.8375 143.909328 \nL 170.785938 143.852873 \nL 167.734375 143.791901 \nL 164.682813 143.726412 \nL 161.63125 143.656407 \nL 158.579688 143.581886 \nL 155.528125 143.502848 \nL 152.476563 143.419294 \nL 149.425 143.331223 \nL 146.373438 143.238635 \nL 143.321875 143.141532 \nL 140.270313 143.039912 \nL 137.21875 142.933775 \nL 134.167188 142.823122 \nL 131.115625 142.707953 \nL 128.064063 142.588267 \nL 125.0125 142.464064 \nL 121.960938 142.335345 \nL 118.909375 142.20211 \nL 115.857813 142.064358 \nL 112.80625 141.92209 \nL 109.754688 141.775305 \nL 106.703125 141.624004 \nL 105.641712 141.569807 \nL 103.651563 141.464621 \nL 100.6 141.298661 \nL 97.548438 141.128027 \nL 94.496875 140.952717 \nL 91.445313 140.772733 \nL 88.39375 140.588073 \nL 85.342188 140.398739 \nL 82.290625 140.20473 \nL 79.239063 140.006045 \nL 76.1875 139.802686 \nL 73.135938 139.594652 \nL 70.084375 139.381943 \nL 67.032813 139.164559 \nL 63.98125 138.9425 \nL 63.477899 138.905101 \nL 60.929688 138.708882 \nL 57.878125 138.469058 \nL 54.826563 138.22439 \nL 51.775 137.974877 \nL 48.723438 137.720518 \nL 45.671875 137.461315 \nL 42.620313 137.197267 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pb820d04d53)\" d=\"M 237.920313 144.051597 \nL 234.86875 144.089986 \nL 231.817188 144.12386 \nL 228.765625 144.153217 \nL 225.714063 144.178057 \nL 222.6625 144.198381 \nL 219.610938 144.214189 \nL 216.559375 144.22548 \nL 213.507813 144.232255 \nL 210.45625 144.234513 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_8\">\n    <path clip-path=\"url(#pb820d04d53)\" d=\"M 43.320212 144.234513 \nL 42.620313 144.178057 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_9\"/>\n   <g id=\"line2d_10\">\n    <path clip-path=\"url(#pb820d04d53)\" d=\"M 57.878125 117.587454 \nL 70.084375 32.316866 \nL 87.41725 40.843925 \nL 105.926808 82.626513 \nL 123.543942 74.184725 \nL 139.305493 54.137609 \nL 152.87833 60.363215 \nL 164.270982 69.764212 \nL 173.662129 65.71131 \nL 181.301232 61.416101 \nL 187.453185 63.872073 \nL 192.369407 65.77408 \nL 196.274465 64.355894 \nL 199.361537 63.546709 \nL 201.79265 64.336721 \nL 203.701295 64.662312 \nL 205.196013 64.234747 \nL 206.364192 64.114708 \nL 207.275645 64.340494 \nL 207.985821 64.377935 \nL 208.538543 64.261298 \n\" style=\"fill:none;stroke:#ff7f0e;stroke-linecap:square;stroke-width:1.5;\"/>\n    <defs>\n     <path d=\"M 0 3 \nC 0.795609 3 1.55874 2.683901 2.12132 2.12132 \nC 2.683901 1.55874 3 0.795609 3 0 \nC 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \nC 1.55874 -2.683901 0.795609 -3 0 -3 \nC -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \nC -2.683901 -1.55874 -3 -0.795609 -3 0 \nC -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \nC -1.55874 2.683901 -0.795609 3 0 3 \nz\n\" id=\"me6a5eead08\" style=\"stroke:#ff7f0e;\"/>\n    </defs>\n    <g clip-path=\"url(#pb820d04d53)\">\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"57.878125\" xlink:href=\"#me6a5eead08\" y=\"117.587454\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"70.084375\" xlink:href=\"#me6a5eead08\" y=\"32.316866\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"87.41725\" xlink:href=\"#me6a5eead08\" y=\"40.843925\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"105.926808\" xlink:href=\"#me6a5eead08\" y=\"82.626513\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"123.543942\" xlink:href=\"#me6a5eead08\" y=\"74.184725\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"139.305493\" xlink:href=\"#me6a5eead08\" y=\"54.137609\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"152.87833\" xlink:href=\"#me6a5eead08\" y=\"60.363215\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"164.270982\" xlink:href=\"#me6a5eead08\" y=\"69.764212\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"173.662129\" xlink:href=\"#me6a5eead08\" y=\"65.71131\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"181.301232\" xlink:href=\"#me6a5eead08\" y=\"61.416101\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"187.453185\" xlink:href=\"#me6a5eead08\" y=\"63.872073\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"192.369407\" xlink:href=\"#me6a5eead08\" y=\"65.77408\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"196.274465\" xlink:href=\"#me6a5eead08\" y=\"64.355894\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"199.361537\" xlink:href=\"#me6a5eead08\" y=\"63.546709\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"201.79265\" xlink:href=\"#me6a5eead08\" y=\"64.336721\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"203.701295\" xlink:href=\"#me6a5eead08\" y=\"64.662312\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"205.196013\" xlink:href=\"#me6a5eead08\" y=\"64.234747\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"206.364192\" xlink:href=\"#me6a5eead08\" y=\"64.114708\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"207.275645\" xlink:href=\"#me6a5eead08\" y=\"64.340494\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"207.985821\" xlink:href=\"#me6a5eead08\" y=\"64.377935\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"208.538543\" xlink:href=\"#me6a5eead08\" y=\"64.261298\"/>\n    </g>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 42.620312 144.234513 \nL 42.620312 8.334513 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 237.920313 144.234513 \nL 237.920313 8.334513 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 42.620313 144.234513 \nL 237.920313 144.234513 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 42.620313 8.334513 \nL 237.920313 8.334513 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"pb820d04d53\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"42.620312\" y=\"8.334513\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "_uKaAZ1lOM40",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "5d787bf6-3355-482f-d03c-af11cc2241f2"
      },
      "source": [
        "eta = 0.6 \n",
        "d2l.show_trace_2d(f_2d, d2l.train_2d(momentum_2d))"
      ],
      "execution_count": 29,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "epoch 20, x1 0.007188, x2 0.002553\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 245.120313 180.65625\" width=\"245.120313pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 245.120313 180.65625 \nL 245.120313 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 42.620312 143.1 \nL 237.920313 143.1 \nL 237.920313 7.2 \nL 42.620312 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m469780ca32\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"88.39375\" xlink:href=\"#m469780ca32\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- −4 -->\n      <defs>\n       <path d=\"M 10.59375 35.5 \nL 73.1875 35.5 \nL 73.1875 27.203125 \nL 10.59375 27.203125 \nz\n\" id=\"DejaVuSans-8722\"/>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(81.022656 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-52\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"149.425\" xlink:href=\"#m469780ca32\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- −2 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(142.053906 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"210.45625\" xlink:href=\"#m469780ca32\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n      </defs>\n      <g transform=\"translate(207.275 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_4\">\n     <!-- x1 -->\n     <defs>\n      <path d=\"M 54.890625 54.6875 \nL 35.109375 28.078125 \nL 55.90625 0 \nL 45.3125 0 \nL 29.390625 21.484375 \nL 13.484375 0 \nL 2.875 0 \nL 24.125 28.609375 \nL 4.6875 54.6875 \nL 15.28125 54.6875 \nL 29.78125 35.203125 \nL 44.28125 54.6875 \nz\n\" id=\"DejaVuSans-120\"/>\n      <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n     </defs>\n     <g transform=\"translate(134.129687 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-49\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_4\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"mec2946c823\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#mec2946c823\" y=\"122.816418\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- −2 -->\n      <g transform=\"translate(20.878125 126.615637)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#mec2946c823\" y=\"82.249254\"/>\n      </g>\n     </g>\n     <g id=\"text_6\">\n      <!-- 0 -->\n      <g transform=\"translate(29.257812 86.048472)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_6\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#mec2946c823\" y=\"41.68209\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 2 -->\n      <g transform=\"translate(29.257812 45.481308)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_8\">\n     <!-- x2 -->\n     <g transform=\"translate(14.798437 81.290625)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-50\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"LineCollection_1\"/>\n   <g id=\"LineCollection_2\">\n    <path clip-path=\"url(#p184a6f384e)\" d=\"M 237.920313 110.642512 \nL 237.740809 110.646269 \nL 234.86875 110.702223 \nL 231.817188 110.754681 \nL 228.765625 110.800144 \nL 225.714063 110.838613 \nL 222.6625 110.870087 \nL 219.610938 110.894568 \nL 216.559375 110.912054 \nL 213.507813 110.922545 \nL 210.45625 110.926042 \nL 207.404688 110.922545 \nL 204.353125 110.912054 \nL 201.301563 110.894568 \nL 198.25 110.870087 \nL 195.198438 110.838613 \nL 192.146875 110.800144 \nL 189.095313 110.754681 \nL 186.04375 110.702223 \nL 183.171691 110.646269 \nL 182.992188 110.642512 \nL 179.940625 110.571144 \nL 176.889063 110.492264 \nL 173.8375 110.405871 \nL 170.785938 110.311965 \nL 167.734375 110.210547 \nL 164.682813 110.101617 \nL 161.63125 109.985174 \nL 158.579688 109.861219 \nL 155.528125 109.729751 \nL 152.476563 109.590771 \nL 149.425 109.444279 \nL 146.373438 109.290274 \nL 143.321875 109.128756 \nL 140.270313 108.959726 \nL 137.21875 108.783184 \nL 134.478571 108.61791 \nL 134.167188 108.597627 \nL 131.115625 108.390734 \nL 128.064063 108.175728 \nL 125.0125 107.952609 \nL 121.960938 107.721376 \nL 118.909375 107.48203 \nL 115.857813 107.23457 \nL 112.80625 106.978997 \nL 109.754688 106.71531 \nL 108.342771 106.589552 \nL 106.703125 106.430811 \nL 103.651563 106.126557 \nL 100.6 105.813485 \nL 97.548438 105.491593 \nL 94.496875 105.160883 \nL 91.445313 104.821353 \nL 89.166297 104.561194 \nL 88.39375 104.464606 \nL 85.342188 104.073422 \nL 82.290625 103.67258 \nL 79.239063 103.262079 \nL 76.1875 102.841919 \nL 73.993118 102.532836 \nL 73.135938 102.399391 \nL 70.084375 101.913653 \nL 67.032813 101.417239 \nL 63.98125 100.910149 \nL 61.590335 100.504478 \nL 60.929688 100.379197 \nL 57.878125 99.788586 \nL 54.826563 99.186045 \nL 51.775 98.571572 \nL 51.31 98.476119 \nL 48.723438 97.874373 \nL 45.671875 97.150925 \nL 42.760292 96.447761 \nL 42.620313 96.408754 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#p184a6f384e)\" d=\"M 42.620313 68.089753 \nL 42.760292 68.050746 \nL 45.671875 67.347582 \nL 48.723438 66.624134 \nL 51.31 66.022388 \nL 51.775 65.926936 \nL 54.826563 65.312463 \nL 57.878125 64.709921 \nL 60.929688 64.119311 \nL 61.590335 63.99403 \nL 63.98125 63.588358 \nL 67.032813 63.081269 \nL 70.084375 62.584855 \nL 73.135938 62.099116 \nL 73.993118 61.965672 \nL 76.1875 61.656588 \nL 79.239063 61.236429 \nL 82.290625 60.825928 \nL 85.342188 60.425085 \nL 88.39375 60.033902 \nL 89.166297 59.937313 \nL 91.445313 59.677154 \nL 94.496875 59.337625 \nL 97.548438 59.006914 \nL 100.6 58.685023 \nL 103.651563 58.37195 \nL 106.703125 58.067696 \nL 108.342771 57.908955 \nL 109.754688 57.783197 \nL 112.80625 57.51951 \nL 115.857813 57.263937 \nL 118.909375 57.016478 \nL 121.960938 56.777131 \nL 125.0125 56.545899 \nL 128.064063 56.322779 \nL 131.115625 56.107773 \nL 134.167188 55.900881 \nL 134.478571 55.880597 \nL 137.21875 55.715323 \nL 140.270313 55.538781 \nL 143.321875 55.369751 \nL 146.373438 55.208234 \nL 149.425 55.054229 \nL 152.476563 54.907736 \nL 155.528125 54.768756 \nL 158.579688 54.637289 \nL 161.63125 54.513333 \nL 164.682813 54.396891 \nL 167.734375 54.28796 \nL 170.785938 54.186542 \nL 173.8375 54.092637 \nL 176.889063 54.006244 \nL 179.940625 53.927363 \nL 182.992188 53.855995 \nL 183.171691 53.852239 \nL 186.04375 53.796284 \nL 189.095313 53.743827 \nL 192.146875 53.698363 \nL 195.198438 53.659894 \nL 198.25 53.62842 \nL 201.301563 53.60394 \nL 204.353125 53.586454 \nL 207.404688 53.575962 \nL 210.45625 53.572465 \nL 213.507813 53.575962 \nL 216.559375 53.586454 \nL 219.610938 53.60394 \nL 222.6625 53.62842 \nL 225.714063 53.659894 \nL 228.765625 53.698363 \nL 231.817188 53.743827 \nL 234.86875 53.796284 \nL 237.740809 53.852239 \nL 237.920313 53.855995 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_3\">\n    <path clip-path=\"url(#p184a6f384e)\" d=\"M 237.920313 122.605781 \nL 234.86875 122.649989 \nL 231.817188 122.688995 \nL 228.765625 122.722801 \nL 225.714063 122.751406 \nL 222.6625 122.774811 \nL 219.610938 122.793014 \nL 216.559375 122.806016 \nL 213.507813 122.813817 \nL 210.45625 122.816418 \nL 210.45625 122.816418 \nL 210.45625 122.816418 \nL 207.404688 122.813817 \nL 204.353125 122.806016 \nL 201.301563 122.793014 \nL 198.25 122.774811 \nL 195.198438 122.751406 \nL 192.146875 122.722801 \nL 189.095313 122.688995 \nL 186.04375 122.649989 \nL 182.992188 122.605781 \nL 179.940625 122.556372 \nL 176.889063 122.501762 \nL 173.8375 122.441952 \nL 170.785938 122.37694 \nL 167.734375 122.306728 \nL 164.682813 122.231315 \nL 161.63125 122.1507 \nL 158.579688 122.064885 \nL 155.528125 121.973869 \nL 152.476563 121.877652 \nL 149.425 121.776234 \nL 146.373438 121.669615 \nL 143.321875 121.557796 \nL 140.270313 121.440775 \nL 137.21875 121.318553 \nL 134.167188 121.191131 \nL 131.115625 121.058507 \nL 128.064063 120.920683 \nL 125.234432 120.78806 \nL 125.0125 120.777096 \nL 121.960938 120.620857 \nL 118.909375 120.459137 \nL 115.857813 120.291934 \nL 112.80625 120.11925 \nL 109.754688 119.941083 \nL 106.703125 119.757434 \nL 103.651563 119.568304 \nL 100.6 119.373691 \nL 97.548438 119.173596 \nL 94.496875 118.968019 \nL 91.484943 118.759701 \nL 91.445313 118.756804 \nL 88.39375 118.527889 \nL 85.342188 118.293179 \nL 82.290625 118.052674 \nL 79.239063 117.806373 \nL 76.1875 117.554277 \nL 73.135938 117.296386 \nL 70.084375 117.032699 \nL 67.032813 116.763217 \nL 66.679474 116.731343 \nL 63.98125 116.473189 \nL 60.929688 116.175081 \nL 57.878125 115.870828 \nL 54.826563 115.560427 \nL 51.775 115.243881 \nL 48.723438 114.921187 \nL 46.698569 114.702985 \nL 45.671875 114.585209 \nL 42.620313 114.228611 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#p184a6f384e)\" d=\"M 42.620313 50.269896 \nL 45.671875 49.913298 \nL 46.698569 49.795522 \nL 48.723438 49.57732 \nL 51.775 49.254627 \nL 54.826563 48.93808 \nL 57.878125 48.62768 \nL 60.929688 48.323426 \nL 63.98125 48.025319 \nL 66.679474 47.767164 \nL 67.032813 47.73529 \nL 70.084375 47.465808 \nL 73.135938 47.202122 \nL 76.1875 46.94423 \nL 79.239063 46.692134 \nL 82.290625 46.445834 \nL 85.342188 46.205328 \nL 88.39375 45.970618 \nL 91.445313 45.741704 \nL 91.484943 45.738806 \nL 94.496875 45.530488 \nL 97.548438 45.324911 \nL 100.6 45.124816 \nL 103.651563 44.930204 \nL 106.703125 44.741073 \nL 109.754688 44.557424 \nL 112.80625 44.379258 \nL 115.857813 44.206573 \nL 118.909375 44.039371 \nL 121.960938 43.87765 \nL 125.0125 43.721412 \nL 125.234432 43.710448 \nL 128.064063 43.577824 \nL 131.115625 43.44 \nL 134.167188 43.307377 \nL 137.21875 43.179954 \nL 140.270313 43.057732 \nL 143.321875 42.940712 \nL 146.373438 42.828892 \nL 149.425 42.722273 \nL 152.476563 42.620855 \nL 155.528125 42.524638 \nL 158.579688 42.433622 \nL 161.63125 42.347807 \nL 164.682813 42.267193 \nL 167.734375 42.19178 \nL 170.785938 42.121567 \nL 173.8375 42.056556 \nL 176.889063 41.996745 \nL 179.940625 41.942135 \nL 182.992188 41.892727 \nL 186.04375 41.848519 \nL 189.095313 41.809512 \nL 192.146875 41.775706 \nL 195.198438 41.747101 \nL 198.25 41.723697 \nL 201.301563 41.705494 \nL 204.353125 41.692491 \nL 207.404688 41.68469 \nL 210.45625 41.68209 \nL 213.507813 41.68469 \nL 216.559375 41.692491 \nL 219.610938 41.705494 \nL 222.6625 41.723697 \nL 225.714063 41.747101 \nL 228.765625 41.775706 \nL 231.817188 41.809512 \nL 234.86875 41.848519 \nL 237.920313 41.892727 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_4\">\n    <path clip-path=\"url(#p184a6f384e)\" d=\"M 237.920313 131.755682 \nL 234.86875 131.790868 \nL 231.817188 131.821914 \nL 228.765625 131.848821 \nL 225.714063 131.871588 \nL 222.6625 131.890216 \nL 219.610938 131.904705 \nL 216.559375 131.915053 \nL 213.507813 131.921263 \nL 210.45625 131.923332 \nL 207.404688 131.921263 \nL 204.353125 131.915053 \nL 201.301563 131.904705 \nL 198.25 131.890216 \nL 195.198438 131.871588 \nL 192.146875 131.848821 \nL 189.095313 131.821914 \nL 186.04375 131.790868 \nL 182.992188 131.755682 \nL 179.940625 131.716357 \nL 176.889063 131.672892 \nL 173.8375 131.625288 \nL 170.785938 131.573544 \nL 167.734375 131.517661 \nL 164.682813 131.457638 \nL 161.63125 131.393475 \nL 158.579688 131.325174 \nL 155.528125 131.252732 \nL 152.476563 131.176151 \nL 149.425 131.095431 \nL 146.373438 131.010571 \nL 143.605741 130.929851 \nL 143.321875 130.921219 \nL 140.270313 130.824117 \nL 137.21875 130.722699 \nL 134.167188 130.616966 \nL 131.115625 130.506916 \nL 128.064063 130.392552 \nL 125.0125 130.273871 \nL 121.960938 130.150875 \nL 118.909375 130.023563 \nL 115.857813 129.891936 \nL 112.80625 129.755992 \nL 109.754688 129.615734 \nL 106.703125 129.471159 \nL 103.651563 129.322269 \nL 100.6 129.169063 \nL 97.548438 129.011542 \nL 95.473375 128.901493 \nL 94.496875 128.847403 \nL 91.445313 128.673866 \nL 88.39375 128.495821 \nL 85.342188 128.313269 \nL 82.290625 128.126209 \nL 79.239063 127.934642 \nL 76.1875 127.738567 \nL 73.135938 127.537985 \nL 70.084375 127.332896 \nL 67.032813 127.123299 \nL 63.98125 126.909194 \nL 63.477899 126.873134 \nL 60.929688 126.682091 \nL 57.878125 126.448594 \nL 54.826563 126.21038 \nL 51.775 125.967449 \nL 48.723438 125.7198 \nL 45.671875 125.467435 \nL 42.620313 125.210352 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#p184a6f384e)\" d=\"M 42.620313 39.288155 \nL 45.671875 39.031073 \nL 48.723438 38.778707 \nL 51.775 38.531059 \nL 54.826563 38.288127 \nL 57.878125 38.049913 \nL 60.929688 37.816416 \nL 63.477899 37.625373 \nL 63.98125 37.589313 \nL 67.032813 37.375209 \nL 70.084375 37.165612 \nL 73.135938 36.960522 \nL 76.1875 36.75994 \nL 79.239063 36.563866 \nL 82.290625 36.372299 \nL 85.342188 36.185239 \nL 88.39375 36.002687 \nL 91.445313 35.824642 \nL 94.496875 35.651104 \nL 95.473375 35.597015 \nL 97.548438 35.486966 \nL 100.6 35.329444 \nL 103.651563 35.176238 \nL 106.703125 35.027348 \nL 109.754688 34.882774 \nL 112.80625 34.742515 \nL 115.857813 34.606572 \nL 118.909375 34.474944 \nL 121.960938 34.347633 \nL 125.0125 34.224636 \nL 128.064063 34.105956 \nL 131.115625 33.991591 \nL 134.167188 33.881542 \nL 137.21875 33.775808 \nL 140.270313 33.67439 \nL 143.321875 33.577288 \nL 143.605741 33.568657 \nL 146.373438 33.487936 \nL 149.425 33.403076 \nL 152.476563 33.322356 \nL 155.528125 33.245775 \nL 158.579688 33.173334 \nL 161.63125 33.105032 \nL 164.682813 33.04087 \nL 167.734375 32.980847 \nL 170.785938 32.924963 \nL 173.8375 32.87322 \nL 176.889063 32.825615 \nL 179.940625 32.78215 \nL 182.992188 32.742825 \nL 186.04375 32.707639 \nL 189.095313 32.676593 \nL 192.146875 32.649686 \nL 195.198438 32.626919 \nL 198.25 32.608291 \nL 201.301563 32.593803 \nL 204.353125 32.583454 \nL 207.404688 32.577245 \nL 210.45625 32.575175 \nL 213.507813 32.577245 \nL 216.559375 32.583454 \nL 219.610938 32.593803 \nL 222.6625 32.608291 \nL 225.714063 32.626919 \nL 228.765625 32.649686 \nL 231.817188 32.676593 \nL 234.86875 32.707639 \nL 237.920313 32.742825 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_5\">\n    <path clip-path=\"url(#p184a6f384e)\" d=\"M 237.920313 139.468527 \nL 234.86875 139.498775 \nL 231.817188 139.525463 \nL 228.765625 139.548594 \nL 225.714063 139.568166 \nL 222.6625 139.584179 \nL 219.610938 139.596634 \nL 216.559375 139.60553 \nL 213.507813 139.610868 \nL 210.45625 139.612647 \nL 207.404688 139.610868 \nL 204.353125 139.60553 \nL 201.301563 139.596634 \nL 198.25 139.584179 \nL 195.198438 139.568166 \nL 192.146875 139.548594 \nL 189.095313 139.525463 \nL 186.04375 139.498775 \nL 182.992188 139.468527 \nL 179.940625 139.434721 \nL 176.889063 139.397357 \nL 173.8375 139.356434 \nL 170.785938 139.311952 \nL 167.734375 139.263912 \nL 164.682813 139.212313 \nL 161.63125 139.157156 \nL 158.579688 139.098441 \nL 155.876875 139.043284 \nL 155.528125 139.035908 \nL 152.476563 138.967681 \nL 149.425 138.895767 \nL 146.373438 138.820164 \nL 143.321875 138.740874 \nL 140.270313 138.657896 \nL 137.21875 138.571229 \nL 134.167188 138.480875 \nL 131.115625 138.386833 \nL 128.064063 138.289103 \nL 125.0125 138.187685 \nL 121.960938 138.082579 \nL 118.909375 137.973786 \nL 115.857813 137.861304 \nL 112.80625 137.745134 \nL 109.754688 137.625277 \nL 106.703125 137.501731 \nL 103.651563 137.374498 \nL 100.6 137.243577 \nL 97.548438 137.108967 \nL 95.473375 137.014925 \nL 94.496875 136.969 \nL 91.445313 136.821657 \nL 88.39375 136.670487 \nL 85.342188 136.51549 \nL 82.290625 136.356666 \nL 79.239063 136.194014 \nL 76.1875 136.027536 \nL 73.135938 135.85723 \nL 70.084375 135.683098 \nL 67.032813 135.505138 \nL 63.98125 135.323351 \nL 60.929688 135.137737 \nL 58.494602 134.986567 \nL 57.878125 134.946795 \nL 54.826563 134.745948 \nL 51.775 134.541124 \nL 48.723438 134.332322 \nL 45.671875 134.119543 \nL 42.620313 133.902788 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#p184a6f384e)\" d=\"M 42.620313 30.59572 \nL 45.671875 30.378964 \nL 48.723438 30.166185 \nL 51.775 29.957384 \nL 54.826563 29.752559 \nL 57.878125 29.551712 \nL 58.494602 29.51194 \nL 60.929688 29.36077 \nL 63.98125 29.175156 \nL 67.032813 28.993369 \nL 70.084375 28.81541 \nL 73.135938 28.641277 \nL 76.1875 28.470972 \nL 79.239063 28.304493 \nL 82.290625 28.141842 \nL 85.342188 27.983017 \nL 88.39375 27.82802 \nL 91.445313 27.67685 \nL 94.496875 27.529507 \nL 95.473375 27.483582 \nL 97.548438 27.38954 \nL 100.6 27.254931 \nL 103.651563 27.124009 \nL 106.703125 26.996776 \nL 109.754688 26.873231 \nL 112.80625 26.753373 \nL 115.857813 26.637204 \nL 118.909375 26.524722 \nL 121.960938 26.415928 \nL 125.0125 26.310822 \nL 128.064063 26.209404 \nL 131.115625 26.111674 \nL 134.167188 26.017632 \nL 137.21875 25.927278 \nL 140.270313 25.840612 \nL 143.321875 25.757634 \nL 146.373438 25.678343 \nL 149.425 25.602741 \nL 152.476563 25.530826 \nL 155.528125 25.4626 \nL 155.876875 25.455224 \nL 158.579688 25.400067 \nL 161.63125 25.341351 \nL 164.682813 25.286194 \nL 167.734375 25.234595 \nL 170.785938 25.186555 \nL 173.8375 25.142074 \nL 176.889063 25.101151 \nL 179.940625 25.063786 \nL 182.992188 25.02998 \nL 186.04375 24.999733 \nL 189.095313 24.973044 \nL 192.146875 24.949914 \nL 195.198438 24.930342 \nL 198.25 24.914328 \nL 201.301563 24.901874 \nL 204.353125 24.892977 \nL 207.404688 24.887639 \nL 210.45625 24.88586 \nL 213.507813 24.887639 \nL 216.559375 24.892977 \nL 219.610938 24.901874 \nL 222.6625 24.914328 \nL 225.714063 24.930342 \nL 228.765625 24.949914 \nL 231.817188 24.973044 \nL 234.86875 24.999733 \nL 237.920313 25.02998 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_6\">\n    <path clip-path=\"url(#p184a6f384e)\" d=\"M 73.993118 143.1 \nL 73.135938 143.057026 \nL 70.084375 142.900602 \nL 67.032813 142.74074 \nL 63.98125 142.57744 \nL 60.929688 142.410702 \nL 57.878125 142.240526 \nL 54.826563 142.066912 \nL 51.775 141.889861 \nL 48.723438 141.709371 \nL 45.671875 141.525444 \nL 42.620313 141.338079 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#p184a6f384e)\" d=\"M 42.620313 23.160429 \nL 45.671875 22.973063 \nL 48.723438 22.789136 \nL 51.775 22.608647 \nL 54.826563 22.431595 \nL 57.878125 22.257981 \nL 60.929688 22.087805 \nL 63.98125 21.921068 \nL 67.032813 21.757768 \nL 70.084375 21.597905 \nL 73.135938 21.441481 \nL 73.993118 21.398507 \nL 76.1875 21.292102 \nL 79.239063 21.147457 \nL 82.290625 21.006137 \nL 85.342188 20.868142 \nL 88.39375 20.733472 \nL 91.445313 20.602127 \nL 94.496875 20.474108 \nL 97.548438 20.349414 \nL 100.6 20.228045 \nL 103.651563 20.110001 \nL 106.703125 19.995283 \nL 109.754688 19.883889 \nL 112.80625 19.775821 \nL 115.857813 19.671078 \nL 118.909375 19.56966 \nL 121.960938 19.471567 \nL 125.0125 19.3768 \nL 125.234432 19.370149 \nL 128.064063 19.288049 \nL 131.115625 19.202729 \nL 134.167188 19.120629 \nL 137.21875 19.041748 \nL 140.270313 18.966087 \nL 143.321875 18.893646 \nL 146.373438 18.824424 \nL 149.425 18.758422 \nL 152.476563 18.69564 \nL 155.528125 18.636077 \nL 158.579688 18.579733 \nL 161.63125 18.52661 \nL 164.682813 18.476706 \nL 167.734375 18.430021 \nL 170.785938 18.386557 \nL 173.8375 18.346311 \nL 176.889063 18.309286 \nL 179.940625 18.27548 \nL 182.992188 18.244893 \nL 186.04375 18.217527 \nL 189.095313 18.19338 \nL 192.146875 18.172452 \nL 195.198438 18.154744 \nL 198.25 18.140256 \nL 201.301563 18.128987 \nL 204.353125 18.120938 \nL 207.404688 18.116109 \nL 210.45625 18.114499 \nL 213.507813 18.116109 \nL 216.559375 18.120938 \nL 219.610938 18.128987 \nL 222.6625 18.140256 \nL 225.714063 18.154744 \nL 228.765625 18.172452 \nL 231.817188 18.19338 \nL 234.86875 18.217527 \nL 237.920313 18.244893 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_7\">\n    <path clip-path=\"url(#p184a6f384e)\" d=\"M 42.620313 16.569455 \nL 45.671875 16.399385 \nL 48.723438 16.232435 \nL 51.775 16.068606 \nL 54.826563 15.907898 \nL 57.878125 15.75031 \nL 60.929688 15.595843 \nL 63.98125 15.444496 \nL 66.679474 15.313433 \nL 67.032813 15.296782 \nL 70.084375 15.156008 \nL 73.135938 15.018261 \nL 76.1875 14.883542 \nL 79.239063 14.75185 \nL 82.290625 14.623186 \nL 85.342188 14.497548 \nL 88.39375 14.374939 \nL 91.445313 14.255356 \nL 94.496875 14.138802 \nL 97.548438 14.025274 \nL 100.6 13.914774 \nL 103.651563 13.807301 \nL 106.703125 13.702856 \nL 109.754688 13.601438 \nL 112.80625 13.503047 \nL 115.857813 13.407684 \nL 118.909375 13.315349 \nL 119.943803 13.285075 \nL 121.960938 13.227751 \nL 125.0125 13.143971 \nL 128.064063 13.063131 \nL 131.115625 12.98523 \nL 134.167188 12.910269 \nL 137.21875 12.838248 \nL 140.270313 12.769166 \nL 143.321875 12.703024 \nL 146.373438 12.639822 \nL 149.425 12.579559 \nL 152.476563 12.522236 \nL 155.528125 12.467852 \nL 158.579688 12.416408 \nL 161.63125 12.367904 \nL 164.682813 12.322339 \nL 167.734375 12.279714 \nL 170.785938 12.240029 \nL 173.8375 12.203284 \nL 176.889063 12.169478 \nL 179.940625 12.138611 \nL 182.992188 12.110685 \nL 186.04375 12.085698 \nL 189.095313 12.06365 \nL 192.146875 12.044543 \nL 195.198438 12.028374 \nL 198.25 12.015146 \nL 201.301563 12.004857 \nL 204.353125 11.997508 \nL 207.404688 11.993099 \nL 210.45625 11.991629 \nL 213.507813 11.993099 \nL 216.559375 11.997508 \nL 219.610938 12.004857 \nL 222.6625 12.015146 \nL 225.714063 12.028374 \nL 228.765625 12.044543 \nL 231.817188 12.06365 \nL 234.86875 12.085698 \nL 237.920313 12.110685 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_8\">\n    <path clip-path=\"url(#p184a6f384e)\" d=\"M 42.620313 10.578216 \nL 45.671875 10.422518 \nL 48.723438 10.269677 \nL 51.775 10.119693 \nL 54.826563 9.972566 \nL 57.878125 9.828295 \nL 60.929688 9.686881 \nL 63.98125 9.548325 \nL 67.032813 9.412625 \nL 70.084375 9.279781 \nL 71.291587 9.228358 \nL 73.135938 9.151947 \nL 76.1875 9.028301 \nL 79.239063 8.907433 \nL 82.290625 8.789344 \nL 85.342188 8.674033 \nL 88.39375 8.561501 \nL 91.445313 8.451747 \nL 94.496875 8.344772 \nL 97.548438 8.240576 \nL 100.6 8.139158 \nL 103.651563 8.040518 \nL 106.703125 7.944658 \nL 109.754688 7.851575 \nL 112.80625 7.761272 \nL 115.857813 7.673747 \nL 118.909375 7.589 \nL 121.960938 7.507032 \nL 125.0125 7.427843 \nL 128.064063 7.351432 \nL 131.115625 7.2778 \nL 134.167188 7.206946 \nL 134.478571 7.2 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_9\"/>\n   <g id=\"line2d_7\">\n    <path clip-path=\"url(#p184a6f384e)\" d=\"M 57.878125 122.816418 \nL 76.1875 25.455224 \nL 101.454438 113.080299 \nL 127.168124 82.898328 \nL 150.019542 66.249564 \nL 168.697656 96.324437 \nL 183.047744 77.581434 \nL 193.511809 79.4127 \nL 200.777175 87.136062 \nL 205.571346 79.269403 \nL 208.554621 82.487715 \nL 210.274453 83.524564 \nL 211.156185 80.982244 \nL 211.513059 82.751907 \nL 211.564679 82.43037 \nL 211.457477 81.834922 \nL 211.283729 82.531594 \nL 211.097558 82.202313 \nL 210.927515 82.15033 \nL 210.785942 82.361755 \nL 210.675592 82.197464 \n\" style=\"fill:none;stroke:#ff7f0e;stroke-linecap:square;stroke-width:1.5;\"/>\n    <defs>\n     <path d=\"M 0 3 \nC 0.795609 3 1.55874 2.683901 2.12132 2.12132 \nC 2.683901 1.55874 3 0.795609 3 0 \nC 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \nC 1.55874 -2.683901 0.795609 -3 0 -3 \nC -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \nC -2.683901 -1.55874 -3 -0.795609 -3 0 \nC -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \nC -1.55874 2.683901 -0.795609 3 0 3 \nz\n\" id=\"m75c6afa334\" style=\"stroke:#ff7f0e;\"/>\n    </defs>\n    <g clip-path=\"url(#p184a6f384e)\">\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"57.878125\" xlink:href=\"#m75c6afa334\" y=\"122.816418\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"76.1875\" xlink:href=\"#m75c6afa334\" y=\"25.455224\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"101.454438\" xlink:href=\"#m75c6afa334\" y=\"113.080299\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"127.168124\" xlink:href=\"#m75c6afa334\" y=\"82.898328\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"150.019542\" xlink:href=\"#m75c6afa334\" y=\"66.249564\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"168.697656\" xlink:href=\"#m75c6afa334\" y=\"96.324437\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"183.047744\" xlink:href=\"#m75c6afa334\" y=\"77.581434\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"193.511809\" xlink:href=\"#m75c6afa334\" y=\"79.4127\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"200.777175\" xlink:href=\"#m75c6afa334\" y=\"87.136062\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"205.571346\" xlink:href=\"#m75c6afa334\" y=\"79.269403\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"208.554621\" xlink:href=\"#m75c6afa334\" y=\"82.487715\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"210.274453\" xlink:href=\"#m75c6afa334\" y=\"83.524564\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"211.156185\" xlink:href=\"#m75c6afa334\" y=\"80.982244\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"211.513059\" xlink:href=\"#m75c6afa334\" y=\"82.751907\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"211.564679\" xlink:href=\"#m75c6afa334\" y=\"82.43037\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"211.457477\" xlink:href=\"#m75c6afa334\" y=\"81.834922\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"211.283729\" xlink:href=\"#m75c6afa334\" y=\"82.531594\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"211.097558\" xlink:href=\"#m75c6afa334\" y=\"82.202313\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"210.927515\" xlink:href=\"#m75c6afa334\" y=\"82.15033\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"210.785942\" xlink:href=\"#m75c6afa334\" y=\"82.361755\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"210.675592\" xlink:href=\"#m75c6afa334\" y=\"82.197464\"/>\n    </g>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 42.620312 143.1 \nL 42.620312 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 237.920313 143.1 \nL 237.920313 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 42.620313 143.1 \nL 237.920313 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 42.620313 7.2 \nL 237.920313 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p184a6f384e\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"42.620312\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "TDmUXYQis21s",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "!mkdir ../data\n",
        "!cp d2l-zh/data/airfoil_self_noise.dat ../data/"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "iESkh1EYOh8V",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "features, labels = d2l.get_data_ch7()\n",
        "\n",
        "def init_momentum_states():\n",
        "    v_w = nd.zeros((features.shape[1], 1))\n",
        "    v_b = nd.zeros(1)\n",
        "    return (v_w, v_b)\n",
        "\n",
        "def sgd_momentum(params, states, hyperparams):\n",
        "    for p, v in zip(params, states):\n",
        "        v[:] = hyperparams['momentum'] * v + hyperparams['lr'] * p.grad \n",
        "        p[:] -= v "
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "VR7BSw2lsEP6",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "aef9d384-b371-49d9-c03d-72cbcc291b73"
      },
      "source": [
        "d2l.train_ch7(sgd_momentum, init_momentum_states(), {'lr':0.02, 'momentum':0.5}, features, labels)"
      ],
      "execution_count": 32,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "loss: 0.246023, 0.203941 sec per epoch\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 252.64375 180.65625\" width=\"252.64375pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 252.64375 180.65625 \nL 252.64375 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \nL 245.44375 7.2 \nL 50.14375 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"mbbbe999d21\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"59.021023\" xlink:href=\"#mbbbe999d21\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- 0.0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n       <path d=\"M 10.6875 12.40625 \nL 21 12.40625 \nL 21 0 \nL 10.6875 0 \nz\n\" id=\"DejaVuSans-46\"/>\n      </defs>\n      <g transform=\"translate(51.06946 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"103.407386\" xlink:href=\"#mbbbe999d21\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- 0.5 -->\n      <defs>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(95.455824 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"147.79375\" xlink:href=\"#mbbbe999d21\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 1.0 -->\n      <defs>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n      </defs>\n      <g transform=\"translate(139.842187 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"192.180114\" xlink:href=\"#mbbbe999d21\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 1.5 -->\n      <g transform=\"translate(184.228551 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"236.566477\" xlink:href=\"#mbbbe999d21\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 2.0 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(228.614915 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_6\">\n     <!-- epoch -->\n     <defs>\n      <path d=\"M 56.203125 29.59375 \nL 56.203125 25.203125 \nL 14.890625 25.203125 \nQ 15.484375 15.921875 20.484375 11.0625 \nQ 25.484375 6.203125 34.421875 6.203125 \nQ 39.59375 6.203125 44.453125 7.46875 \nQ 49.3125 8.734375 54.109375 11.28125 \nL 54.109375 2.78125 \nQ 49.265625 0.734375 44.1875 -0.34375 \nQ 39.109375 -1.421875 33.890625 -1.421875 \nQ 20.796875 -1.421875 13.15625 6.1875 \nQ 5.515625 13.8125 5.515625 26.8125 \nQ 5.515625 40.234375 12.765625 48.109375 \nQ 20.015625 56 32.328125 56 \nQ 43.359375 56 49.78125 48.890625 \nQ 56.203125 41.796875 56.203125 29.59375 \nz\nM 47.21875 32.234375 \nQ 47.125 39.59375 43.09375 43.984375 \nQ 39.0625 48.390625 32.421875 48.390625 \nQ 24.90625 48.390625 20.390625 44.140625 \nQ 15.875 39.890625 15.1875 32.171875 \nz\n\" id=\"DejaVuSans-101\"/>\n      <path d=\"M 18.109375 8.203125 \nL 18.109375 -20.796875 \nL 9.078125 -20.796875 \nL 9.078125 54.6875 \nL 18.109375 54.6875 \nL 18.109375 46.390625 \nQ 20.953125 51.265625 25.265625 53.625 \nQ 29.59375 56 35.59375 56 \nQ 45.5625 56 51.78125 48.09375 \nQ 58.015625 40.1875 58.015625 27.296875 \nQ 58.015625 14.40625 51.78125 6.484375 \nQ 45.5625 -1.421875 35.59375 -1.421875 \nQ 29.59375 -1.421875 25.265625 0.953125 \nQ 20.953125 3.328125 18.109375 8.203125 \nz\nM 48.6875 27.296875 \nQ 48.6875 37.203125 44.609375 42.84375 \nQ 40.53125 48.484375 33.40625 48.484375 \nQ 26.265625 48.484375 22.1875 42.84375 \nQ 18.109375 37.203125 18.109375 27.296875 \nQ 18.109375 17.390625 22.1875 11.75 \nQ 26.265625 6.109375 33.40625 6.109375 \nQ 40.53125 6.109375 44.609375 11.75 \nQ 48.6875 17.390625 48.6875 27.296875 \nz\n\" id=\"DejaVuSans-112\"/>\n      <path d=\"M 30.609375 48.390625 \nQ 23.390625 48.390625 19.1875 42.75 \nQ 14.984375 37.109375 14.984375 27.296875 \nQ 14.984375 17.484375 19.15625 11.84375 \nQ 23.34375 6.203125 30.609375 6.203125 \nQ 37.796875 6.203125 41.984375 11.859375 \nQ 46.1875 17.53125 46.1875 27.296875 \nQ 46.1875 37.015625 41.984375 42.703125 \nQ 37.796875 48.390625 30.609375 48.390625 \nz\nM 30.609375 56 \nQ 42.328125 56 49.015625 48.375 \nQ 55.71875 40.765625 55.71875 27.296875 \nQ 55.71875 13.875 49.015625 6.21875 \nQ 42.328125 -1.421875 30.609375 -1.421875 \nQ 18.84375 -1.421875 12.171875 6.21875 \nQ 5.515625 13.875 5.515625 27.296875 \nQ 5.515625 40.765625 12.171875 48.375 \nQ 18.84375 56 30.609375 56 \nz\n\" id=\"DejaVuSans-111\"/>\n      <path d=\"M 48.78125 52.59375 \nL 48.78125 44.1875 \nQ 44.96875 46.296875 41.140625 47.34375 \nQ 37.3125 48.390625 33.40625 48.390625 \nQ 24.65625 48.390625 19.8125 42.84375 \nQ 14.984375 37.3125 14.984375 27.296875 \nQ 14.984375 17.28125 19.8125 11.734375 \nQ 24.65625 6.203125 33.40625 6.203125 \nQ 37.3125 6.203125 41.140625 7.25 \nQ 44.96875 8.296875 48.78125 10.40625 \nL 48.78125 2.09375 \nQ 45.015625 0.34375 40.984375 -0.53125 \nQ 36.96875 -1.421875 32.421875 -1.421875 \nQ 20.0625 -1.421875 12.78125 6.34375 \nQ 5.515625 14.109375 5.515625 27.296875 \nQ 5.515625 40.671875 12.859375 48.328125 \nQ 20.21875 56 33.015625 56 \nQ 37.15625 56 41.109375 55.140625 \nQ 45.0625 54.296875 48.78125 52.59375 \nz\n\" id=\"DejaVuSans-99\"/>\n      <path d=\"M 54.890625 33.015625 \nL 54.890625 0 \nL 45.90625 0 \nL 45.90625 32.71875 \nQ 45.90625 40.484375 42.875 44.328125 \nQ 39.84375 48.1875 33.796875 48.1875 \nQ 26.515625 48.1875 22.3125 43.546875 \nQ 18.109375 38.921875 18.109375 30.90625 \nL 18.109375 0 \nL 9.078125 0 \nL 9.078125 75.984375 \nL 18.109375 75.984375 \nL 18.109375 46.1875 \nQ 21.34375 51.125 25.703125 53.5625 \nQ 30.078125 56 35.796875 56 \nQ 45.21875 56 50.046875 50.171875 \nQ 54.890625 44.34375 54.890625 33.015625 \nz\n\" id=\"DejaVuSans-104\"/>\n     </defs>\n     <g transform=\"translate(132.565625 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-101\"/>\n      <use x=\"61.523438\" xlink:href=\"#DejaVuSans-112\"/>\n      <use x=\"125\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"186.181641\" xlink:href=\"#DejaVuSans-99\"/>\n      <use x=\"241.162109\" xlink:href=\"#DejaVuSans-104\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_6\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m1097b676d9\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m1097b676d9\" y=\"133.563479\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0.25 -->\n      <g transform=\"translate(20.878125 137.362698)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m1097b676d9\" y=\"109.597776\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0.30 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 113.396994)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m1097b676d9\" y=\"85.632072\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 0.35 -->\n      <g transform=\"translate(20.878125 89.431291)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m1097b676d9\" y=\"61.666368\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 0.40 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(20.878125 65.465587)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m1097b676d9\" y=\"37.700665\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 0.45 -->\n      <g transform=\"translate(20.878125 41.499883)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_11\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m1097b676d9\" y=\"13.734961\"/>\n      </g>\n     </g>\n     <g id=\"text_12\">\n      <!-- 0.50 -->\n      <g transform=\"translate(20.878125 17.53418)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_13\">\n     <!-- loss -->\n     <defs>\n      <path d=\"M 9.421875 75.984375 \nL 18.40625 75.984375 \nL 18.40625 0 \nL 9.421875 0 \nz\n\" id=\"DejaVuSans-108\"/>\n      <path d=\"M 44.28125 53.078125 \nL 44.28125 44.578125 \nQ 40.484375 46.53125 36.375 47.5 \nQ 32.28125 48.484375 27.875 48.484375 \nQ 21.1875 48.484375 17.84375 46.4375 \nQ 14.5 44.390625 14.5 40.28125 \nQ 14.5 37.15625 16.890625 35.375 \nQ 19.28125 33.59375 26.515625 31.984375 \nL 29.59375 31.296875 \nQ 39.15625 29.25 43.1875 25.515625 \nQ 47.21875 21.78125 47.21875 15.09375 \nQ 47.21875 7.46875 41.1875 3.015625 \nQ 35.15625 -1.421875 24.609375 -1.421875 \nQ 20.21875 -1.421875 15.453125 -0.5625 \nQ 10.6875 0.296875 5.421875 2 \nL 5.421875 11.28125 \nQ 10.40625 8.6875 15.234375 7.390625 \nQ 20.0625 6.109375 24.8125 6.109375 \nQ 31.15625 6.109375 34.5625 8.28125 \nQ 37.984375 10.453125 37.984375 14.40625 \nQ 37.984375 18.0625 35.515625 20.015625 \nQ 33.0625 21.96875 24.703125 23.78125 \nL 21.578125 24.515625 \nQ 13.234375 26.265625 9.515625 29.90625 \nQ 5.8125 33.546875 5.8125 39.890625 \nQ 5.8125 47.609375 11.28125 51.796875 \nQ 16.75 56 26.8125 56 \nQ 31.78125 56 36.171875 55.265625 \nQ 40.578125 54.546875 44.28125 53.078125 \nz\n\" id=\"DejaVuSans-115\"/>\n     </defs>\n     <g transform=\"translate(14.798437 84.807812)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-108\"/>\n      <use x=\"27.783203\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"88.964844\" xlink:href=\"#DejaVuSans-115\"/>\n      <use x=\"141.064453\" xlink:href=\"#DejaVuSans-115\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_12\">\n    <path clip-path=\"url(#pfccaa5f19f)\" d=\"M 59.021023 13.377273 \nL 64.939205 54.689574 \nL 70.857386 85.40452 \nL 76.775568 104.048703 \nL 82.69375 116.834942 \nL 88.611932 125.8431 \nL 94.530114 129.583827 \nL 100.448295 129.780727 \nL 106.366477 127.240055 \nL 112.284659 132.900128 \nL 118.202841 132.897557 \nL 124.121023 133.293728 \nL 130.039205 134.099955 \nL 135.957386 132.976394 \nL 141.875568 133.778578 \nL 147.79375 135.036693 \nL 153.711932 135.290896 \nL 159.630114 136.407208 \nL 165.548295 135.636057 \nL 171.466477 136.922727 \nL 177.384659 136.560125 \nL 183.302841 135.855941 \nL 189.221023 135.743299 \nL 195.139205 134.506104 \nL 201.057386 136.723506 \nL 206.975568 135.663955 \nL 212.89375 136.090595 \nL 218.811932 136.269575 \nL 224.730114 136.560811 \nL 230.648295 136.357654 \nL 236.566477 135.469512 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 50.14375 143.1 \nL 50.14375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 245.44375 143.1 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 50.14375 7.2 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"pfccaa5f19f\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"50.14375\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "Dwr5v8Iwu9lP",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "e6c6e327-bcc4-40ab-b7b3-23461456ab65"
      },
      "source": [
        "d2l.train_ch7(sgd_momentum, init_momentum_states(), {'lr':0.02, 'momentum':0.9}, features, labels)"
      ],
      "execution_count": 33,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "loss: 0.253452, 0.184558 sec per epoch\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 252.64375 180.65625\" width=\"252.64375pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 252.64375 180.65625 \nL 252.64375 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \nL 245.44375 7.2 \nL 50.14375 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m91c73f13d6\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"59.021023\" xlink:href=\"#m91c73f13d6\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- 0.0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n       <path d=\"M 10.6875 12.40625 \nL 21 12.40625 \nL 21 0 \nL 10.6875 0 \nz\n\" id=\"DejaVuSans-46\"/>\n      </defs>\n      <g transform=\"translate(51.06946 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"103.407386\" xlink:href=\"#m91c73f13d6\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- 0.5 -->\n      <defs>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(95.455824 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"147.79375\" xlink:href=\"#m91c73f13d6\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 1.0 -->\n      <defs>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n      </defs>\n      <g transform=\"translate(139.842187 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"192.180114\" xlink:href=\"#m91c73f13d6\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 1.5 -->\n      <g transform=\"translate(184.228551 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"236.566477\" xlink:href=\"#m91c73f13d6\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 2.0 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(228.614915 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_6\">\n     <!-- epoch -->\n     <defs>\n      <path d=\"M 56.203125 29.59375 \nL 56.203125 25.203125 \nL 14.890625 25.203125 \nQ 15.484375 15.921875 20.484375 11.0625 \nQ 25.484375 6.203125 34.421875 6.203125 \nQ 39.59375 6.203125 44.453125 7.46875 \nQ 49.3125 8.734375 54.109375 11.28125 \nL 54.109375 2.78125 \nQ 49.265625 0.734375 44.1875 -0.34375 \nQ 39.109375 -1.421875 33.890625 -1.421875 \nQ 20.796875 -1.421875 13.15625 6.1875 \nQ 5.515625 13.8125 5.515625 26.8125 \nQ 5.515625 40.234375 12.765625 48.109375 \nQ 20.015625 56 32.328125 56 \nQ 43.359375 56 49.78125 48.890625 \nQ 56.203125 41.796875 56.203125 29.59375 \nz\nM 47.21875 32.234375 \nQ 47.125 39.59375 43.09375 43.984375 \nQ 39.0625 48.390625 32.421875 48.390625 \nQ 24.90625 48.390625 20.390625 44.140625 \nQ 15.875 39.890625 15.1875 32.171875 \nz\n\" id=\"DejaVuSans-101\"/>\n      <path d=\"M 18.109375 8.203125 \nL 18.109375 -20.796875 \nL 9.078125 -20.796875 \nL 9.078125 54.6875 \nL 18.109375 54.6875 \nL 18.109375 46.390625 \nQ 20.953125 51.265625 25.265625 53.625 \nQ 29.59375 56 35.59375 56 \nQ 45.5625 56 51.78125 48.09375 \nQ 58.015625 40.1875 58.015625 27.296875 \nQ 58.015625 14.40625 51.78125 6.484375 \nQ 45.5625 -1.421875 35.59375 -1.421875 \nQ 29.59375 -1.421875 25.265625 0.953125 \nQ 20.953125 3.328125 18.109375 8.203125 \nz\nM 48.6875 27.296875 \nQ 48.6875 37.203125 44.609375 42.84375 \nQ 40.53125 48.484375 33.40625 48.484375 \nQ 26.265625 48.484375 22.1875 42.84375 \nQ 18.109375 37.203125 18.109375 27.296875 \nQ 18.109375 17.390625 22.1875 11.75 \nQ 26.265625 6.109375 33.40625 6.109375 \nQ 40.53125 6.109375 44.609375 11.75 \nQ 48.6875 17.390625 48.6875 27.296875 \nz\n\" id=\"DejaVuSans-112\"/>\n      <path d=\"M 30.609375 48.390625 \nQ 23.390625 48.390625 19.1875 42.75 \nQ 14.984375 37.109375 14.984375 27.296875 \nQ 14.984375 17.484375 19.15625 11.84375 \nQ 23.34375 6.203125 30.609375 6.203125 \nQ 37.796875 6.203125 41.984375 11.859375 \nQ 46.1875 17.53125 46.1875 27.296875 \nQ 46.1875 37.015625 41.984375 42.703125 \nQ 37.796875 48.390625 30.609375 48.390625 \nz\nM 30.609375 56 \nQ 42.328125 56 49.015625 48.375 \nQ 55.71875 40.765625 55.71875 27.296875 \nQ 55.71875 13.875 49.015625 6.21875 \nQ 42.328125 -1.421875 30.609375 -1.421875 \nQ 18.84375 -1.421875 12.171875 6.21875 \nQ 5.515625 13.875 5.515625 27.296875 \nQ 5.515625 40.765625 12.171875 48.375 \nQ 18.84375 56 30.609375 56 \nz\n\" id=\"DejaVuSans-111\"/>\n      <path d=\"M 48.78125 52.59375 \nL 48.78125 44.1875 \nQ 44.96875 46.296875 41.140625 47.34375 \nQ 37.3125 48.390625 33.40625 48.390625 \nQ 24.65625 48.390625 19.8125 42.84375 \nQ 14.984375 37.3125 14.984375 27.296875 \nQ 14.984375 17.28125 19.8125 11.734375 \nQ 24.65625 6.203125 33.40625 6.203125 \nQ 37.3125 6.203125 41.140625 7.25 \nQ 44.96875 8.296875 48.78125 10.40625 \nL 48.78125 2.09375 \nQ 45.015625 0.34375 40.984375 -0.53125 \nQ 36.96875 -1.421875 32.421875 -1.421875 \nQ 20.0625 -1.421875 12.78125 6.34375 \nQ 5.515625 14.109375 5.515625 27.296875 \nQ 5.515625 40.671875 12.859375 48.328125 \nQ 20.21875 56 33.015625 56 \nQ 37.15625 56 41.109375 55.140625 \nQ 45.0625 54.296875 48.78125 52.59375 \nz\n\" id=\"DejaVuSans-99\"/>\n      <path d=\"M 54.890625 33.015625 \nL 54.890625 0 \nL 45.90625 0 \nL 45.90625 32.71875 \nQ 45.90625 40.484375 42.875 44.328125 \nQ 39.84375 48.1875 33.796875 48.1875 \nQ 26.515625 48.1875 22.3125 43.546875 \nQ 18.109375 38.921875 18.109375 30.90625 \nL 18.109375 0 \nL 9.078125 0 \nL 9.078125 75.984375 \nL 18.109375 75.984375 \nL 18.109375 46.1875 \nQ 21.34375 51.125 25.703125 53.5625 \nQ 30.078125 56 35.796875 56 \nQ 45.21875 56 50.046875 50.171875 \nQ 54.890625 44.34375 54.890625 33.015625 \nz\n\" id=\"DejaVuSans-104\"/>\n     </defs>\n     <g transform=\"translate(132.565625 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-101\"/>\n      <use x=\"61.523438\" xlink:href=\"#DejaVuSans-112\"/>\n      <use x=\"125\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"186.181641\" xlink:href=\"#DejaVuSans-99\"/>\n      <use x=\"241.162109\" xlink:href=\"#DejaVuSans-104\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_6\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"md11994dabd\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#md11994dabd\" y=\"134.151648\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0.25 -->\n      <g transform=\"translate(20.878125 137.950867)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#md11994dabd\" y=\"109.568\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0.30 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 113.367219)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#md11994dabd\" y=\"84.984352\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 0.35 -->\n      <g transform=\"translate(20.878125 88.78357)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#md11994dabd\" y=\"60.400704\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 0.40 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(20.878125 64.199922)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#md11994dabd\" y=\"35.817056\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 0.45 -->\n      <g transform=\"translate(20.878125 39.616274)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_11\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#md11994dabd\" y=\"11.233408\"/>\n      </g>\n     </g>\n     <g id=\"text_12\">\n      <!-- 0.50 -->\n      <g transform=\"translate(20.878125 15.032626)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_13\">\n     <!-- loss -->\n     <defs>\n      <path d=\"M 9.421875 75.984375 \nL 18.40625 75.984375 \nL 18.40625 0 \nL 9.421875 0 \nz\n\" id=\"DejaVuSans-108\"/>\n      <path d=\"M 44.28125 53.078125 \nL 44.28125 44.578125 \nQ 40.484375 46.53125 36.375 47.5 \nQ 32.28125 48.484375 27.875 48.484375 \nQ 21.1875 48.484375 17.84375 46.4375 \nQ 14.5 44.390625 14.5 40.28125 \nQ 14.5 37.15625 16.890625 35.375 \nQ 19.28125 33.59375 26.515625 31.984375 \nL 29.59375 31.296875 \nQ 39.15625 29.25 43.1875 25.515625 \nQ 47.21875 21.78125 47.21875 15.09375 \nQ 47.21875 7.46875 41.1875 3.015625 \nQ 35.15625 -1.421875 24.609375 -1.421875 \nQ 20.21875 -1.421875 15.453125 -0.5625 \nQ 10.6875 0.296875 5.421875 2 \nL 5.421875 11.28125 \nQ 10.40625 8.6875 15.234375 7.390625 \nQ 20.0625 6.109375 24.8125 6.109375 \nQ 31.15625 6.109375 34.5625 8.28125 \nQ 37.984375 10.453125 37.984375 14.40625 \nQ 37.984375 18.0625 35.515625 20.015625 \nQ 33.0625 21.96875 24.703125 23.78125 \nL 21.578125 24.515625 \nQ 13.234375 26.265625 9.515625 29.90625 \nQ 5.8125 33.546875 5.8125 39.890625 \nQ 5.8125 47.609375 11.28125 51.796875 \nQ 16.75 56 26.8125 56 \nQ 31.78125 56 36.171875 55.265625 \nQ 40.578125 54.546875 44.28125 53.078125 \nz\n\" id=\"DejaVuSans-115\"/>\n     </defs>\n     <g transform=\"translate(14.798437 84.807812)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-108\"/>\n      <use x=\"27.783203\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"88.964844\" xlink:href=\"#DejaVuSans-115\"/>\n      <use x=\"141.064453\" xlink:href=\"#DejaVuSans-115\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_12\">\n    <path clip-path=\"url(#p4535f22ddb)\" d=\"M 59.021023 13.377273 \nL 64.939205 96.578977 \nL 70.857386 126.948264 \nL 76.775568 113.55991 \nL 82.69375 129.476053 \nL 88.611932 127.212648 \nL 94.530114 134.299152 \nL 100.448295 136.164786 \nL 106.366477 130.466844 \nL 112.284659 115.421734 \nL 118.202841 133.619612 \nL 124.121023 129.967998 \nL 130.039205 130.01118 \nL 135.957386 126.408565 \nL 141.875568 133.656098 \nL 147.79375 132.678436 \nL 153.711932 135.650437 \nL 159.630114 131.595638 \nL 165.548295 132.717882 \nL 171.466477 123.973047 \nL 177.384659 117.760704 \nL 183.302841 126.597061 \nL 189.221023 112.552238 \nL 195.139205 128.594235 \nL 201.057386 131.576223 \nL 206.975568 128.830383 \nL 212.89375 136.922727 \nL 218.811932 132.275713 \nL 224.730114 128.664409 \nL 230.648295 136.888337 \nL 236.566477 132.45423 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 50.14375 143.1 \nL 50.14375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 245.44375 143.1 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 50.14375 7.2 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p4535f22ddb\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"50.14375\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "6woEi3OqvQSa",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "c44aea4c-48b5-4956-c700-56de49dc5179"
      },
      "source": [
        "d2l.train_ch7(sgd_momentum, init_momentum_states(), {'lr':0.004, 'momentum':0.9}, features, labels)"
      ],
      "execution_count": 34,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "loss: 0.243960, 0.215766 sec per epoch\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"181.393449pt\" version=\"1.1\" viewBox=\"0 0 252.64375 181.393449\" width=\"252.64375pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 181.393449 \nL 252.64375 181.393449 \nL 252.64375 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 50.14375 143.837199 \nL 245.44375 143.837199 \nL 245.44375 7.937199 \nL 50.14375 7.937199 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"mdaaace266d\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"59.021023\" xlink:href=\"#mdaaace266d\" y=\"143.837199\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- 0.0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n       <path d=\"M 10.6875 12.40625 \nL 21 12.40625 \nL 21 0 \nL 10.6875 0 \nz\n\" id=\"DejaVuSans-46\"/>\n      </defs>\n      <g transform=\"translate(51.06946 158.435637)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"103.407386\" xlink:href=\"#mdaaace266d\" y=\"143.837199\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- 0.5 -->\n      <defs>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(95.455824 158.435637)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"147.79375\" xlink:href=\"#mdaaace266d\" y=\"143.837199\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 1.0 -->\n      <defs>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n      </defs>\n      <g transform=\"translate(139.842187 158.435637)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"192.180114\" xlink:href=\"#mdaaace266d\" y=\"143.837199\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 1.5 -->\n      <g transform=\"translate(184.228551 158.435637)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"236.566477\" xlink:href=\"#mdaaace266d\" y=\"143.837199\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 2.0 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(228.614915 158.435637)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_6\">\n     <!-- epoch -->\n     <defs>\n      <path d=\"M 56.203125 29.59375 \nL 56.203125 25.203125 \nL 14.890625 25.203125 \nQ 15.484375 15.921875 20.484375 11.0625 \nQ 25.484375 6.203125 34.421875 6.203125 \nQ 39.59375 6.203125 44.453125 7.46875 \nQ 49.3125 8.734375 54.109375 11.28125 \nL 54.109375 2.78125 \nQ 49.265625 0.734375 44.1875 -0.34375 \nQ 39.109375 -1.421875 33.890625 -1.421875 \nQ 20.796875 -1.421875 13.15625 6.1875 \nQ 5.515625 13.8125 5.515625 26.8125 \nQ 5.515625 40.234375 12.765625 48.109375 \nQ 20.015625 56 32.328125 56 \nQ 43.359375 56 49.78125 48.890625 \nQ 56.203125 41.796875 56.203125 29.59375 \nz\nM 47.21875 32.234375 \nQ 47.125 39.59375 43.09375 43.984375 \nQ 39.0625 48.390625 32.421875 48.390625 \nQ 24.90625 48.390625 20.390625 44.140625 \nQ 15.875 39.890625 15.1875 32.171875 \nz\n\" id=\"DejaVuSans-101\"/>\n      <path d=\"M 18.109375 8.203125 \nL 18.109375 -20.796875 \nL 9.078125 -20.796875 \nL 9.078125 54.6875 \nL 18.109375 54.6875 \nL 18.109375 46.390625 \nQ 20.953125 51.265625 25.265625 53.625 \nQ 29.59375 56 35.59375 56 \nQ 45.5625 56 51.78125 48.09375 \nQ 58.015625 40.1875 58.015625 27.296875 \nQ 58.015625 14.40625 51.78125 6.484375 \nQ 45.5625 -1.421875 35.59375 -1.421875 \nQ 29.59375 -1.421875 25.265625 0.953125 \nQ 20.953125 3.328125 18.109375 8.203125 \nz\nM 48.6875 27.296875 \nQ 48.6875 37.203125 44.609375 42.84375 \nQ 40.53125 48.484375 33.40625 48.484375 \nQ 26.265625 48.484375 22.1875 42.84375 \nQ 18.109375 37.203125 18.109375 27.296875 \nQ 18.109375 17.390625 22.1875 11.75 \nQ 26.265625 6.109375 33.40625 6.109375 \nQ 40.53125 6.109375 44.609375 11.75 \nQ 48.6875 17.390625 48.6875 27.296875 \nz\n\" id=\"DejaVuSans-112\"/>\n      <path d=\"M 30.609375 48.390625 \nQ 23.390625 48.390625 19.1875 42.75 \nQ 14.984375 37.109375 14.984375 27.296875 \nQ 14.984375 17.484375 19.15625 11.84375 \nQ 23.34375 6.203125 30.609375 6.203125 \nQ 37.796875 6.203125 41.984375 11.859375 \nQ 46.1875 17.53125 46.1875 27.296875 \nQ 46.1875 37.015625 41.984375 42.703125 \nQ 37.796875 48.390625 30.609375 48.390625 \nz\nM 30.609375 56 \nQ 42.328125 56 49.015625 48.375 \nQ 55.71875 40.765625 55.71875 27.296875 \nQ 55.71875 13.875 49.015625 6.21875 \nQ 42.328125 -1.421875 30.609375 -1.421875 \nQ 18.84375 -1.421875 12.171875 6.21875 \nQ 5.515625 13.875 5.515625 27.296875 \nQ 5.515625 40.765625 12.171875 48.375 \nQ 18.84375 56 30.609375 56 \nz\n\" id=\"DejaVuSans-111\"/>\n      <path d=\"M 48.78125 52.59375 \nL 48.78125 44.1875 \nQ 44.96875 46.296875 41.140625 47.34375 \nQ 37.3125 48.390625 33.40625 48.390625 \nQ 24.65625 48.390625 19.8125 42.84375 \nQ 14.984375 37.3125 14.984375 27.296875 \nQ 14.984375 17.28125 19.8125 11.734375 \nQ 24.65625 6.203125 33.40625 6.203125 \nQ 37.3125 6.203125 41.140625 7.25 \nQ 44.96875 8.296875 48.78125 10.40625 \nL 48.78125 2.09375 \nQ 45.015625 0.34375 40.984375 -0.53125 \nQ 36.96875 -1.421875 32.421875 -1.421875 \nQ 20.0625 -1.421875 12.78125 6.34375 \nQ 5.515625 14.109375 5.515625 27.296875 \nQ 5.515625 40.671875 12.859375 48.328125 \nQ 20.21875 56 33.015625 56 \nQ 37.15625 56 41.109375 55.140625 \nQ 45.0625 54.296875 48.78125 52.59375 \nz\n\" id=\"DejaVuSans-99\"/>\n      <path d=\"M 54.890625 33.015625 \nL 54.890625 0 \nL 45.90625 0 \nL 45.90625 32.71875 \nQ 45.90625 40.484375 42.875 44.328125 \nQ 39.84375 48.1875 33.796875 48.1875 \nQ 26.515625 48.1875 22.3125 43.546875 \nQ 18.109375 38.921875 18.109375 30.90625 \nL 18.109375 0 \nL 9.078125 0 \nL 9.078125 75.984375 \nL 18.109375 75.984375 \nL 18.109375 46.1875 \nQ 21.34375 51.125 25.703125 53.5625 \nQ 30.078125 56 35.796875 56 \nQ 45.21875 56 50.046875 50.171875 \nQ 54.890625 44.34375 54.890625 33.015625 \nz\n\" id=\"DejaVuSans-104\"/>\n     </defs>\n     <g transform=\"translate(132.565625 172.113762)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-101\"/>\n      <use x=\"61.523438\" xlink:href=\"#DejaVuSans-112\"/>\n      <use x=\"125\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"186.181641\" xlink:href=\"#DejaVuSans-99\"/>\n      <use x=\"241.162109\" xlink:href=\"#DejaVuSans-104\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_6\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"mdbe688a794\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mdbe688a794\" y=\"134.286154\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0.25 -->\n      <g transform=\"translate(20.878125 138.085373)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mdbe688a794\" y=\"109.628767\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0.30 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 113.427986)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mdbe688a794\" y=\"84.97138\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 0.35 -->\n      <g transform=\"translate(20.878125 88.770599)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mdbe688a794\" y=\"60.313993\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 0.40 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(20.878125 64.113212)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mdbe688a794\" y=\"35.656606\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 0.45 -->\n      <g transform=\"translate(20.878125 39.455825)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_11\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mdbe688a794\" y=\"10.999219\"/>\n      </g>\n     </g>\n     <g id=\"text_12\">\n      <!-- 0.50 -->\n      <g transform=\"translate(20.878125 14.798437)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_13\">\n     <!-- loss -->\n     <defs>\n      <path d=\"M 9.421875 75.984375 \nL 18.40625 75.984375 \nL 18.40625 0 \nL 9.421875 0 \nz\n\" id=\"DejaVuSans-108\"/>\n      <path d=\"M 44.28125 53.078125 \nL 44.28125 44.578125 \nQ 40.484375 46.53125 36.375 47.5 \nQ 32.28125 48.484375 27.875 48.484375 \nQ 21.1875 48.484375 17.84375 46.4375 \nQ 14.5 44.390625 14.5 40.28125 \nQ 14.5 37.15625 16.890625 35.375 \nQ 19.28125 33.59375 26.515625 31.984375 \nL 29.59375 31.296875 \nQ 39.15625 29.25 43.1875 25.515625 \nQ 47.21875 21.78125 47.21875 15.09375 \nQ 47.21875 7.46875 41.1875 3.015625 \nQ 35.15625 -1.421875 24.609375 -1.421875 \nQ 20.21875 -1.421875 15.453125 -0.5625 \nQ 10.6875 0.296875 5.421875 2 \nL 5.421875 11.28125 \nQ 10.40625 8.6875 15.234375 7.390625 \nQ 20.0625 6.109375 24.8125 6.109375 \nQ 31.15625 6.109375 34.5625 8.28125 \nQ 37.984375 10.453125 37.984375 14.40625 \nQ 37.984375 18.0625 35.515625 20.015625 \nQ 33.0625 21.96875 24.703125 23.78125 \nL 21.578125 24.515625 \nQ 13.234375 26.265625 9.515625 29.90625 \nQ 5.8125 33.546875 5.8125 39.890625 \nQ 5.8125 47.609375 11.28125 51.796875 \nQ 16.75 56 26.8125 56 \nQ 31.78125 56 36.171875 55.265625 \nQ 40.578125 54.546875 44.28125 53.078125 \nz\n\" id=\"DejaVuSans-115\"/>\n     </defs>\n     <g transform=\"translate(14.798437 85.545012)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-108\"/>\n      <use x=\"27.783203\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"88.964844\" xlink:href=\"#DejaVuSans-115\"/>\n      <use x=\"141.064453\" xlink:href=\"#DejaVuSans-115\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_12\">\n    <path clip-path=\"url(#p1704b88c20)\" d=\"M 59.021023 14.114472 \nL 64.939205 33.507418 \nL 70.857386 65.471252 \nL 76.775568 97.371359 \nL 82.69375 118.065985 \nL 88.611932 127.061355 \nL 94.530114 130.810414 \nL 100.448295 130.296403 \nL 106.366477 132.603941 \nL 112.284659 134.836562 \nL 118.202841 135.683628 \nL 124.121023 135.546344 \nL 130.039205 135.223077 \nL 135.957386 135.312927 \nL 141.875568 135.340462 \nL 147.79375 136.519811 \nL 153.711932 136.711738 \nL 159.630114 135.040681 \nL 165.548295 135.970329 \nL 171.466477 137.420043 \nL 177.384659 137.659927 \nL 183.302841 136.630031 \nL 189.221023 136.875418 \nL 195.139205 136.973175 \nL 201.057386 135.901966 \nL 206.975568 136.444232 \nL 212.89375 137.656899 \nL 218.811932 136.582449 \nL 224.730114 136.011612 \nL 230.648295 137.004244 \nL 236.566477 137.264939 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 50.14375 143.837199 \nL 50.14375 7.937199 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 245.44375 143.837199 \nL 245.44375 7.937199 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 50.14375 143.837199 \nL 245.44375 143.837199 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 50.14375 7.937199 \nL 245.44375 7.937199 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p1704b88c20\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"50.14375\" y=\"7.937199\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "b9NMvC65vbaJ",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "d9a90fd1-ff8d-423c-ec7b-3c0c6e45ba48"
      },
      "source": [
        "d2l.train_gluon_ch7('sgd', {'learning_rate': 0.004, 'momentum': 0.9}, features, labels)"
      ],
      "execution_count": 35,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "loss: 0.244027, 0.167657 sec per epoch\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 252.64375 180.65625\" width=\"252.64375pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 252.64375 180.65625 \nL 252.64375 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \nL 245.44375 7.2 \nL 50.14375 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"me8b99e1f12\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"59.021023\" xlink:href=\"#me8b99e1f12\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- 0.0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n       <path d=\"M 10.6875 12.40625 \nL 21 12.40625 \nL 21 0 \nL 10.6875 0 \nz\n\" id=\"DejaVuSans-46\"/>\n      </defs>\n      <g transform=\"translate(51.06946 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"103.407386\" xlink:href=\"#me8b99e1f12\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- 0.5 -->\n      <defs>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(95.455824 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"147.79375\" xlink:href=\"#me8b99e1f12\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 1.0 -->\n      <defs>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n      </defs>\n      <g transform=\"translate(139.842187 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"192.180114\" xlink:href=\"#me8b99e1f12\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 1.5 -->\n      <g transform=\"translate(184.228551 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"236.566477\" xlink:href=\"#me8b99e1f12\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 2.0 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(228.614915 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_6\">\n     <!-- epoch -->\n     <defs>\n      <path d=\"M 56.203125 29.59375 \nL 56.203125 25.203125 \nL 14.890625 25.203125 \nQ 15.484375 15.921875 20.484375 11.0625 \nQ 25.484375 6.203125 34.421875 6.203125 \nQ 39.59375 6.203125 44.453125 7.46875 \nQ 49.3125 8.734375 54.109375 11.28125 \nL 54.109375 2.78125 \nQ 49.265625 0.734375 44.1875 -0.34375 \nQ 39.109375 -1.421875 33.890625 -1.421875 \nQ 20.796875 -1.421875 13.15625 6.1875 \nQ 5.515625 13.8125 5.515625 26.8125 \nQ 5.515625 40.234375 12.765625 48.109375 \nQ 20.015625 56 32.328125 56 \nQ 43.359375 56 49.78125 48.890625 \nQ 56.203125 41.796875 56.203125 29.59375 \nz\nM 47.21875 32.234375 \nQ 47.125 39.59375 43.09375 43.984375 \nQ 39.0625 48.390625 32.421875 48.390625 \nQ 24.90625 48.390625 20.390625 44.140625 \nQ 15.875 39.890625 15.1875 32.171875 \nz\n\" id=\"DejaVuSans-101\"/>\n      <path d=\"M 18.109375 8.203125 \nL 18.109375 -20.796875 \nL 9.078125 -20.796875 \nL 9.078125 54.6875 \nL 18.109375 54.6875 \nL 18.109375 46.390625 \nQ 20.953125 51.265625 25.265625 53.625 \nQ 29.59375 56 35.59375 56 \nQ 45.5625 56 51.78125 48.09375 \nQ 58.015625 40.1875 58.015625 27.296875 \nQ 58.015625 14.40625 51.78125 6.484375 \nQ 45.5625 -1.421875 35.59375 -1.421875 \nQ 29.59375 -1.421875 25.265625 0.953125 \nQ 20.953125 3.328125 18.109375 8.203125 \nz\nM 48.6875 27.296875 \nQ 48.6875 37.203125 44.609375 42.84375 \nQ 40.53125 48.484375 33.40625 48.484375 \nQ 26.265625 48.484375 22.1875 42.84375 \nQ 18.109375 37.203125 18.109375 27.296875 \nQ 18.109375 17.390625 22.1875 11.75 \nQ 26.265625 6.109375 33.40625 6.109375 \nQ 40.53125 6.109375 44.609375 11.75 \nQ 48.6875 17.390625 48.6875 27.296875 \nz\n\" id=\"DejaVuSans-112\"/>\n      <path d=\"M 30.609375 48.390625 \nQ 23.390625 48.390625 19.1875 42.75 \nQ 14.984375 37.109375 14.984375 27.296875 \nQ 14.984375 17.484375 19.15625 11.84375 \nQ 23.34375 6.203125 30.609375 6.203125 \nQ 37.796875 6.203125 41.984375 11.859375 \nQ 46.1875 17.53125 46.1875 27.296875 \nQ 46.1875 37.015625 41.984375 42.703125 \nQ 37.796875 48.390625 30.609375 48.390625 \nz\nM 30.609375 56 \nQ 42.328125 56 49.015625 48.375 \nQ 55.71875 40.765625 55.71875 27.296875 \nQ 55.71875 13.875 49.015625 6.21875 \nQ 42.328125 -1.421875 30.609375 -1.421875 \nQ 18.84375 -1.421875 12.171875 6.21875 \nQ 5.515625 13.875 5.515625 27.296875 \nQ 5.515625 40.765625 12.171875 48.375 \nQ 18.84375 56 30.609375 56 \nz\n\" id=\"DejaVuSans-111\"/>\n      <path d=\"M 48.78125 52.59375 \nL 48.78125 44.1875 \nQ 44.96875 46.296875 41.140625 47.34375 \nQ 37.3125 48.390625 33.40625 48.390625 \nQ 24.65625 48.390625 19.8125 42.84375 \nQ 14.984375 37.3125 14.984375 27.296875 \nQ 14.984375 17.28125 19.8125 11.734375 \nQ 24.65625 6.203125 33.40625 6.203125 \nQ 37.3125 6.203125 41.140625 7.25 \nQ 44.96875 8.296875 48.78125 10.40625 \nL 48.78125 2.09375 \nQ 45.015625 0.34375 40.984375 -0.53125 \nQ 36.96875 -1.421875 32.421875 -1.421875 \nQ 20.0625 -1.421875 12.78125 6.34375 \nQ 5.515625 14.109375 5.515625 27.296875 \nQ 5.515625 40.671875 12.859375 48.328125 \nQ 20.21875 56 33.015625 56 \nQ 37.15625 56 41.109375 55.140625 \nQ 45.0625 54.296875 48.78125 52.59375 \nz\n\" id=\"DejaVuSans-99\"/>\n      <path d=\"M 54.890625 33.015625 \nL 54.890625 0 \nL 45.90625 0 \nL 45.90625 32.71875 \nQ 45.90625 40.484375 42.875 44.328125 \nQ 39.84375 48.1875 33.796875 48.1875 \nQ 26.515625 48.1875 22.3125 43.546875 \nQ 18.109375 38.921875 18.109375 30.90625 \nL 18.109375 0 \nL 9.078125 0 \nL 9.078125 75.984375 \nL 18.109375 75.984375 \nL 18.109375 46.1875 \nQ 21.34375 51.125 25.703125 53.5625 \nQ 30.078125 56 35.796875 56 \nQ 45.21875 56 50.046875 50.171875 \nQ 54.890625 44.34375 54.890625 33.015625 \nz\n\" id=\"DejaVuSans-104\"/>\n     </defs>\n     <g transform=\"translate(132.565625 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-101\"/>\n      <use x=\"61.523438\" xlink:href=\"#DejaVuSans-112\"/>\n      <use x=\"125\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"186.181641\" xlink:href=\"#DejaVuSans-99\"/>\n      <use x=\"241.162109\" xlink:href=\"#DejaVuSans-104\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_6\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"mdeaf174522\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mdeaf174522\" y=\"133.485527\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0.25 -->\n      <g transform=\"translate(20.878125 137.284746)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mdeaf174522\" y=\"109.876326\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0.30 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 113.675545)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mdeaf174522\" y=\"86.267125\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 0.35 -->\n      <g transform=\"translate(20.878125 90.066344)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mdeaf174522\" y=\"62.657924\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 0.40 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(20.878125 66.457143)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mdeaf174522\" y=\"39.048723\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 0.45 -->\n      <g transform=\"translate(20.878125 42.847942)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_11\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mdeaf174522\" y=\"15.439523\"/>\n      </g>\n     </g>\n     <g id=\"text_12\">\n      <!-- 0.50 -->\n      <g transform=\"translate(20.878125 19.238741)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_13\">\n     <!-- loss -->\n     <defs>\n      <path d=\"M 9.421875 75.984375 \nL 18.40625 75.984375 \nL 18.40625 0 \nL 9.421875 0 \nz\n\" id=\"DejaVuSans-108\"/>\n      <path d=\"M 44.28125 53.078125 \nL 44.28125 44.578125 \nQ 40.484375 46.53125 36.375 47.5 \nQ 32.28125 48.484375 27.875 48.484375 \nQ 21.1875 48.484375 17.84375 46.4375 \nQ 14.5 44.390625 14.5 40.28125 \nQ 14.5 37.15625 16.890625 35.375 \nQ 19.28125 33.59375 26.515625 31.984375 \nL 29.59375 31.296875 \nQ 39.15625 29.25 43.1875 25.515625 \nQ 47.21875 21.78125 47.21875 15.09375 \nQ 47.21875 7.46875 41.1875 3.015625 \nQ 35.15625 -1.421875 24.609375 -1.421875 \nQ 20.21875 -1.421875 15.453125 -0.5625 \nQ 10.6875 0.296875 5.421875 2 \nL 5.421875 11.28125 \nQ 10.40625 8.6875 15.234375 7.390625 \nQ 20.0625 6.109375 24.8125 6.109375 \nQ 31.15625 6.109375 34.5625 8.28125 \nQ 37.984375 10.453125 37.984375 14.40625 \nQ 37.984375 18.0625 35.515625 20.015625 \nQ 33.0625 21.96875 24.703125 23.78125 \nL 21.578125 24.515625 \nQ 13.234375 26.265625 9.515625 29.90625 \nQ 5.8125 33.546875 5.8125 39.890625 \nQ 5.8125 47.609375 11.28125 51.796875 \nQ 16.75 56 26.8125 56 \nQ 31.78125 56 36.171875 55.265625 \nQ 40.578125 54.546875 44.28125 53.078125 \nz\n\" id=\"DejaVuSans-115\"/>\n     </defs>\n     <g transform=\"translate(14.798437 84.807812)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-108\"/>\n      <use x=\"27.783203\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"88.964844\" xlink:href=\"#DejaVuSans-115\"/>\n      <use x=\"141.064453\" xlink:href=\"#DejaVuSans-115\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_12\">\n    <path clip-path=\"url(#p9084bf50d9)\" d=\"M 59.021023 13.377273 \nL 64.939205 41.519663 \nL 70.857386 79.334173 \nL 76.775568 104.607105 \nL 82.69375 120.041501 \nL 88.611932 125.865385 \nL 94.530114 130.023039 \nL 100.448295 132.305251 \nL 106.366477 132.493607 \nL 112.284659 134.81304 \nL 118.202841 135.557965 \nL 124.121023 135.214963 \nL 130.039205 134.628821 \nL 135.957386 135.435987 \nL 141.875568 136.223917 \nL 147.79375 136.351305 \nL 153.711932 134.605447 \nL 159.630114 134.2287 \nL 165.548295 135.115803 \nL 171.466477 136.633227 \nL 177.384659 136.497142 \nL 183.302841 136.525702 \nL 189.221023 136.397124 \nL 195.139205 135.909692 \nL 201.057386 135.715595 \nL 206.975568 136.096395 \nL 212.89375 136.705572 \nL 218.811932 136.922727 \nL 224.730114 136.345135 \nL 230.648295 136.162274 \nL 236.566477 136.305648 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 50.14375 143.1 \nL 50.14375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 245.44375 143.1 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 50.14375 7.2 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p9084bf50d9\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"50.14375\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "6L48Kjunv0DA",
        "colab_type": "text"
      },
      "source": [
        "## 7.5 AdaGrad 算法"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "sBbe0zg8wPCt",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "54f8ebe4-2418-4a9e-b757-2da4512b4a2a"
      },
      "source": [
        "%matplotlib inline \n",
        "import d2lzh as d2l \n",
        "import math \n",
        "from mxnet import nd \n",
        "\n",
        "def adagrad_2d(x1, x2, s1, s2):\n",
        "    g1, g2, eps = 0.2 * x1, 4 * x2, 1e-6\n",
        "    s1 += g1 ** 2 \n",
        "    s2 += g2 ** 2 \n",
        "    x1 -= eta / math.sqrt(s1 + eps) * g1\n",
        "    x2 -= eta / math.sqrt(s2 + eps) * g2\n",
        "    return x1, x2, s1, s2 \n",
        "\n",
        "def f_2d(x1, x2):\n",
        "    return 0.1 * x1 ** 2 + 2 * x2 ** 2\n",
        "\n",
        "eta = 0.4 \n",
        "d2l.show_trace_2d(f_2d, d2l.train_2d(adagrad_2d))"
      ],
      "execution_count": 36,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "epoch 20, x1 -2.382563, x2 -0.158591\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 245.120313 180.65625\" width=\"245.120313pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 245.120313 180.65625 \nL 245.120313 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 42.620312 143.1 \nL 237.920313 143.1 \nL 237.920313 7.2 \nL 42.620312 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"maa2869959e\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"88.39375\" xlink:href=\"#maa2869959e\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- −4 -->\n      <defs>\n       <path d=\"M 10.59375 35.5 \nL 73.1875 35.5 \nL 73.1875 27.203125 \nL 10.59375 27.203125 \nz\n\" id=\"DejaVuSans-8722\"/>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(81.022656 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-52\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"149.425\" xlink:href=\"#maa2869959e\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- −2 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(142.053906 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"210.45625\" xlink:href=\"#maa2869959e\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n      </defs>\n      <g transform=\"translate(207.275 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_4\">\n     <!-- x1 -->\n     <defs>\n      <path d=\"M 54.890625 54.6875 \nL 35.109375 28.078125 \nL 55.90625 0 \nL 45.3125 0 \nL 29.390625 21.484375 \nL 13.484375 0 \nL 2.875 0 \nL 24.125 28.609375 \nL 4.6875 54.6875 \nL 15.28125 54.6875 \nL 29.78125 35.203125 \nL 44.28125 54.6875 \nz\n\" id=\"DejaVuSans-120\"/>\n      <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n     </defs>\n     <g transform=\"translate(134.129687 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-49\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_4\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"ma7b1fb4396\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#ma7b1fb4396\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- −3 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 146.899219)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-51\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#ma7b1fb4396\" y=\"108.253846\"/>\n      </g>\n     </g>\n     <g id=\"text_6\">\n      <!-- −2 -->\n      <g transform=\"translate(20.878125 112.053065)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_6\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#ma7b1fb4396\" y=\"73.407692\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- −1 -->\n      <g transform=\"translate(20.878125 77.206911)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-49\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#ma7b1fb4396\" y=\"38.561538\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0 -->\n      <g transform=\"translate(29.257812 42.360757)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_9\">\n     <!-- x2 -->\n     <g transform=\"translate(14.798437 81.290625)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-50\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"LineCollection_1\"/>\n   <g id=\"LineCollection_2\">\n    <path clip-path=\"url(#p008860cf85)\" d=\"M 237.920313 80.648723 \nL 234.86875 80.7672 \nL 231.817188 80.871738 \nL 228.765625 80.962338 \nL 225.714063 81.039 \nL 222.6625 81.101723 \nL 219.610938 81.150508 \nL 216.559375 81.185354 \nL 213.507813 81.206262 \nL 210.45625 81.213231 \nL 207.404688 81.206262 \nL 204.353125 81.185354 \nL 201.301563 81.150508 \nL 198.25 81.101723 \nL 195.198438 81.039 \nL 192.146875 80.962338 \nL 189.095313 80.871738 \nL 186.04375 80.7672 \nL 182.992188 80.648723 \nL 179.940625 80.516308 \nL 177.034375 80.376923 \nL 176.889063 80.369348 \nL 173.8375 80.195117 \nL 170.785938 80.005736 \nL 167.734375 79.801204 \nL 164.682813 79.581522 \nL 161.63125 79.346689 \nL 158.579688 79.096706 \nL 155.528125 78.831572 \nL 152.476563 78.551288 \nL 149.425 78.255853 \nL 146.373438 77.945268 \nL 143.321875 77.619532 \nL 140.270313 77.278645 \nL 137.21875 76.922609 \nL 136.969643 76.892308 \nL 134.167188 76.518956 \nL 131.115625 76.095824 \nL 128.064063 75.656099 \nL 125.0125 75.19978 \nL 121.960938 74.726868 \nL 118.909375 74.237363 \nL 115.857813 73.731264 \nL 113.96875 73.407692 \nL 112.80625 73.187611 \nL 109.754688 72.591559 \nL 106.703125 71.977166 \nL 103.651563 71.344433 \nL 100.6 70.69336 \nL 97.548438 70.023947 \nL 97.100875 69.923077 \nL 94.496875 69.267149 \nL 91.445313 68.477986 \nL 88.39375 67.668326 \nL 85.342188 66.838167 \nL 83.908321 66.438462 \nL 82.290625 65.927385 \nL 79.239063 64.940077 \nL 76.1875 63.929538 \nL 73.307374 62.953846 \nL 73.135938 62.886834 \nL 70.084375 61.667219 \nL 67.032813 60.420799 \nL 64.752171 59.469231 \nL 63.98125 59.089091 \nL 60.929688 57.552692 \nL 57.878125 55.984615 \nL 57.878125 55.984615 \nL 54.826563 54.029359 \nL 52.486044 52.5 \nL 51.775 51.902637 \nL 48.723438 49.289176 \nL 48.409725 49.015385 \nL 45.671875 45.670154 \nL 45.559891 45.530769 \nL 43.880132 42.046154 \nL 43.320212 38.561538 \nL 43.880132 35.076923 \nL 45.559891 31.592308 \nL 45.671875 31.452923 \nL 48.409725 28.107692 \nL 48.723438 27.833901 \nL 51.775 25.22044 \nL 52.486044 24.623077 \nL 54.826563 23.093718 \nL 57.878125 21.138462 \nL 57.878125 21.138462 \nL 60.929688 19.570385 \nL 63.98125 18.033986 \nL 64.752171 17.653846 \nL 67.032813 16.702278 \nL 70.084375 15.455858 \nL 73.135938 14.236243 \nL 73.307374 14.169231 \nL 76.1875 13.193538 \nL 79.239063 12.183 \nL 82.290625 11.195692 \nL 83.908321 10.684615 \nL 85.342188 10.28491 \nL 88.39375 9.454751 \nL 91.445313 8.64509 \nL 94.496875 7.855928 \nL 97.100875 7.2 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_3\">\n    <path clip-path=\"url(#p008860cf85)\" d=\"M 237.920313 98.491945 \nL 234.86875 98.576571 \nL 231.817188 98.651242 \nL 228.765625 98.715956 \nL 225.714063 98.770714 \nL 222.6625 98.815516 \nL 219.610938 98.850363 \nL 216.559375 98.875253 \nL 213.507813 98.890187 \nL 210.45625 98.895165 \nL 207.404688 98.890187 \nL 204.353125 98.875253 \nL 201.301563 98.850363 \nL 198.25 98.815516 \nL 195.198438 98.770714 \nL 192.146875 98.715956 \nL 189.095313 98.651242 \nL 186.04375 98.576571 \nL 182.992188 98.491945 \nL 179.940625 98.397363 \nL 176.889063 98.292824 \nL 173.8375 98.17833 \nL 170.785938 98.053879 \nL 167.734375 97.919473 \nL 165.208944 97.8 \nL 164.682813 97.773601 \nL 161.63125 97.60993 \nL 158.579688 97.435699 \nL 155.528125 97.250909 \nL 152.476563 97.055559 \nL 149.425 96.84965 \nL 146.373438 96.633182 \nL 143.321875 96.406154 \nL 140.270313 96.168566 \nL 137.21875 95.92042 \nL 134.167188 95.661713 \nL 131.115625 95.392448 \nL 128.064063 95.112622 \nL 125.0125 94.822238 \nL 121.960938 94.521294 \nL 119.943803 94.315385 \nL 118.909375 94.202978 \nL 115.857813 93.860136 \nL 112.80625 93.506055 \nL 109.754688 93.140732 \nL 106.703125 92.764169 \nL 103.651563 92.376365 \nL 100.6 91.97732 \nL 97.548438 91.567035 \nL 94.496875 91.145509 \nL 92.277557 90.830769 \nL 91.445313 90.704602 \nL 88.39375 90.229973 \nL 85.342188 89.743329 \nL 82.290625 89.244668 \nL 79.239063 88.733992 \nL 76.1875 88.2113 \nL 73.135938 87.676592 \nL 71.291587 87.346154 \nL 70.084375 87.113846 \nL 67.032813 86.513718 \nL 63.98125 85.900684 \nL 60.929688 85.274744 \nL 57.878125 84.635897 \nL 54.826563 83.984145 \nL 54.263653 83.861538 \nL 51.775 83.276123 \nL 48.723438 82.544354 \nL 45.671875 81.798646 \nL 42.620313 81.039 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_4\">\n    <path clip-path=\"url(#p008860cf85)\" d=\"M 237.920313 112.139597 \nL 234.86875 112.208479 \nL 231.817188 112.269258 \nL 228.765625 112.321932 \nL 225.714063 112.366503 \nL 222.6625 112.40297 \nL 219.610938 112.431333 \nL 216.559375 112.451592 \nL 213.507813 112.463748 \nL 210.45625 112.4678 \nL 207.404688 112.463748 \nL 204.353125 112.451592 \nL 201.301563 112.431333 \nL 198.25 112.40297 \nL 195.198438 112.366503 \nL 192.146875 112.321932 \nL 189.095313 112.269258 \nL 186.04375 112.208479 \nL 182.992188 112.139597 \nL 179.940625 112.062612 \nL 176.889063 111.977522 \nL 173.8375 111.884329 \nL 170.785938 111.783032 \nL 169.542708 111.738462 \nL 167.734375 111.670469 \nL 164.682813 111.547233 \nL 161.63125 111.415497 \nL 158.579688 111.275263 \nL 155.528125 111.126529 \nL 152.476563 110.969296 \nL 149.425 110.803565 \nL 146.373438 110.629334 \nL 143.321875 110.446604 \nL 140.270313 110.255375 \nL 137.21875 110.055647 \nL 134.167188 109.84742 \nL 131.115625 109.630694 \nL 128.064063 109.405469 \nL 125.0125 109.171745 \nL 121.960938 108.929522 \nL 118.909375 108.678799 \nL 115.857813 108.419578 \nL 113.96875 108.253846 \nL 112.80625 108.146627 \nL 109.754688 107.856243 \nL 106.703125 107.556923 \nL 103.651563 107.248669 \nL 100.6 106.931479 \nL 97.548438 106.605355 \nL 94.496875 106.270296 \nL 91.445313 105.926302 \nL 88.39375 105.573373 \nL 85.342188 105.211509 \nL 82.290625 104.84071 \nL 81.716213 104.769231 \nL 79.239063 104.444314 \nL 76.1875 104.034636 \nL 73.135938 103.615541 \nL 70.084375 103.187027 \nL 67.032813 102.749096 \nL 63.98125 102.301746 \nL 60.929688 101.844979 \nL 57.878125 101.378794 \nL 57.273855 101.284615 \nL 54.826563 100.881396 \nL 51.775 100.368659 \nL 48.723438 99.845967 \nL 45.671875 99.313319 \nL 42.620313 98.770714 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_5\">\n    <path clip-path=\"url(#p008860cf85)\" d=\"M 237.920313 123.611044 \nL 234.86875 123.671491 \nL 231.817188 123.724827 \nL 228.765625 123.771052 \nL 225.714063 123.810165 \nL 222.6625 123.842166 \nL 219.610938 123.867057 \nL 216.559375 123.884835 \nL 213.507813 123.895502 \nL 210.45625 123.899058 \nL 207.404688 123.895502 \nL 204.353125 123.884835 \nL 201.301563 123.867057 \nL 198.25 123.842166 \nL 195.198438 123.810165 \nL 192.146875 123.771052 \nL 189.095313 123.724827 \nL 186.04375 123.671491 \nL 182.992188 123.611044 \nL 179.940625 123.543485 \nL 176.889063 123.468815 \nL 173.8375 123.387033 \nL 170.785938 123.29814 \nL 167.734375 123.202135 \nL 164.682813 123.099019 \nL 161.63125 122.988791 \nL 158.579688 122.871452 \nL 155.528125 122.747002 \nL 152.476563 122.61544 \nL 149.425 122.476766 \nL 146.373438 122.330981 \nL 143.605741 122.192308 \nL 143.321875 122.17748 \nL 140.270313 122.010663 \nL 137.21875 121.836432 \nL 134.167188 121.654787 \nL 131.115625 121.465728 \nL 128.064063 121.269255 \nL 125.0125 121.065368 \nL 121.960938 120.854067 \nL 118.909375 120.635352 \nL 115.857813 120.409223 \nL 112.80625 120.175679 \nL 109.754688 119.934722 \nL 106.703125 119.68635 \nL 103.651563 119.430565 \nL 100.6 119.167365 \nL 97.548438 118.896751 \nL 95.473375 118.707692 \nL 94.496875 118.614769 \nL 91.445313 118.316641 \nL 88.39375 118.010769 \nL 85.342188 117.697154 \nL 82.290625 117.375795 \nL 79.239063 117.046692 \nL 76.1875 116.709846 \nL 73.135938 116.365256 \nL 70.084375 116.012923 \nL 67.032813 115.652846 \nL 63.98125 115.285026 \nL 63.477899 115.223077 \nL 60.929688 114.894875 \nL 57.878125 114.493739 \nL 54.826563 114.084499 \nL 51.775 113.667156 \nL 48.723438 113.241708 \nL 45.671875 112.808157 \nL 42.620313 112.366503 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_6\">\n    <path clip-path=\"url(#p008860cf85)\" d=\"M 237.920313 133.720049 \nL 234.86875 133.773902 \nL 231.817188 133.82142 \nL 228.765625 133.862601 \nL 225.714063 133.897448 \nL 222.6625 133.925958 \nL 219.610938 133.948133 \nL 216.559375 133.963972 \nL 213.507813 133.973476 \nL 210.45625 133.976643 \nL 207.404688 133.973476 \nL 204.353125 133.963972 \nL 201.301563 133.948133 \nL 198.25 133.925958 \nL 195.198438 133.897448 \nL 192.146875 133.862601 \nL 189.095313 133.82142 \nL 186.04375 133.773902 \nL 182.992188 133.720049 \nL 179.940625 133.65986 \nL 176.889063 133.593336 \nL 173.8375 133.520476 \nL 170.785938 133.44128 \nL 167.734375 133.355748 \nL 164.682813 133.263881 \nL 161.63125 133.165678 \nL 158.579688 133.06114 \nL 155.528125 132.950266 \nL 152.476563 132.833056 \nL 149.425 132.70951 \nL 147.936433 132.646154 \nL 146.373438 132.577119 \nL 143.321875 132.435762 \nL 140.270313 132.28783 \nL 137.21875 132.133324 \nL 134.167188 131.972242 \nL 131.115625 131.804586 \nL 128.064063 131.630356 \nL 125.0125 131.44955 \nL 121.960938 131.26217 \nL 118.909375 131.068215 \nL 115.857813 130.867685 \nL 112.80625 130.660581 \nL 109.754688 130.446901 \nL 106.703125 130.226647 \nL 103.651563 129.999819 \nL 100.6 129.766415 \nL 97.548438 129.526437 \nL 94.496875 129.279884 \nL 93.07017 129.161538 \nL 91.445313 129.021471 \nL 88.39375 128.751584 \nL 85.342188 128.474864 \nL 82.290625 128.191312 \nL 79.239063 127.900928 \nL 76.1875 127.60371 \nL 73.135938 127.299661 \nL 70.084375 126.988778 \nL 67.032813 126.671063 \nL 63.98125 126.346516 \nL 60.929688 126.015136 \nL 57.878125 125.676923 \nL 57.878125 125.676923 \nL 54.826563 125.317794 \nL 51.775 124.951554 \nL 48.723438 124.578203 \nL 45.671875 124.197739 \nL 42.620313 123.810165 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_7\">\n    <path clip-path=\"url(#p008860cf85)\" d=\"M 210.45625 143.1 \nL 207.404688 143.097047 \nL 204.353125 143.088188 \nL 201.301563 143.073422 \nL 198.25 143.052751 \nL 195.198438 143.026173 \nL 192.146875 142.99369 \nL 189.095313 142.9553 \nL 186.04375 142.911004 \nL 182.992188 142.860802 \nL 179.940625 142.804694 \nL 176.889063 142.742679 \nL 173.8375 142.674759 \nL 170.785938 142.600932 \nL 167.734375 142.521199 \nL 164.682813 142.435561 \nL 161.63125 142.344016 \nL 158.579688 142.246565 \nL 155.528125 142.143207 \nL 152.476563 142.033944 \nL 149.425 141.918774 \nL 146.373438 141.797699 \nL 143.321875 141.670717 \nL 140.270313 141.537829 \nL 137.21875 141.399035 \nL 134.167188 141.254335 \nL 131.115625 141.103729 \nL 128.064063 140.947216 \nL 125.0125 140.784798 \nL 121.960938 140.616473 \nL 118.909375 140.442243 \nL 115.857813 140.262106 \nL 112.80625 140.076063 \nL 109.754688 139.884113 \nL 106.703125 139.686258 \nL 105.641712 139.615385 \nL 103.651563 139.477834 \nL 100.6 139.26081 \nL 97.548438 139.037672 \nL 94.496875 138.808421 \nL 91.445313 138.573057 \nL 88.39375 138.331579 \nL 85.342188 138.083988 \nL 82.290625 137.830283 \nL 79.239063 137.570466 \nL 76.1875 137.304534 \nL 73.135938 137.03249 \nL 70.084375 136.754332 \nL 67.032813 136.470061 \nL 63.98125 136.179676 \nL 63.477899 136.130769 \nL 60.929688 135.874175 \nL 57.878125 135.560559 \nL 54.826563 135.240608 \nL 51.775 134.914322 \nL 48.723438 134.581699 \nL 45.671875 134.242741 \nL 42.620313 133.897448 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#p008860cf85)\" d=\"M 237.920313 142.860802 \nL 234.86875 142.911004 \nL 231.817188 142.9553 \nL 228.765625 142.99369 \nL 225.714063 143.026173 \nL 222.6625 143.052751 \nL 219.610938 143.073422 \nL 216.559375 143.088188 \nL 213.507813 143.097047 \nL 210.45625 143.1 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_8\">\n    <path clip-path=\"url(#p008860cf85)\" d=\"M 43.320212 143.1 \nL 42.620313 143.026173 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_9\"/>\n   <g id=\"line2d_8\">\n    <path clip-path=\"url(#p008860cf85)\" d=\"M 57.878125 108.253846 \nL 70.084369 94.315385 \nL 78.348688 85.608097 \nL 84.908015 79.108408 \nL 90.459611 73.910729 \nL 95.325825 69.601347 \nL 99.686585 65.9495 \nL 103.654327 62.810089 \nL 107.304852 60.084212 \nL 110.692126 57.700407 \nL 113.856191 55.604725 \nL 116.827733 53.755022 \nL 119.630892 52.117488 \nL 122.285062 50.664405 \nL 124.806115 49.372664 \nL 127.207235 48.222725 \nL 129.499519 47.197881 \nL 131.692415 46.283724 \nL 133.79405 45.467733 \nL 135.811475 44.738964 \nL 137.750858 44.087809 \n\" style=\"fill:none;stroke:#ff7f0e;stroke-linecap:square;stroke-width:1.5;\"/>\n    <defs>\n     <path d=\"M 0 3 \nC 0.795609 3 1.55874 2.683901 2.12132 2.12132 \nC 2.683901 1.55874 3 0.795609 3 0 \nC 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \nC 1.55874 -2.683901 0.795609 -3 0 -3 \nC -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \nC -2.683901 -1.55874 -3 -0.795609 -3 0 \nC -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \nC -1.55874 2.683901 -0.795609 3 0 3 \nz\n\" id=\"mb2433499a2\" style=\"stroke:#ff7f0e;\"/>\n    </defs>\n    <g clip-path=\"url(#p008860cf85)\">\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"57.878125\" xlink:href=\"#mb2433499a2\" y=\"108.253846\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"70.084369\" xlink:href=\"#mb2433499a2\" y=\"94.315385\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"78.348688\" xlink:href=\"#mb2433499a2\" y=\"85.608097\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"84.908015\" xlink:href=\"#mb2433499a2\" y=\"79.108408\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"90.459611\" xlink:href=\"#mb2433499a2\" y=\"73.910729\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"95.325825\" xlink:href=\"#mb2433499a2\" y=\"69.601347\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"99.686585\" xlink:href=\"#mb2433499a2\" y=\"65.9495\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"103.654327\" xlink:href=\"#mb2433499a2\" y=\"62.810089\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"107.304852\" xlink:href=\"#mb2433499a2\" y=\"60.084212\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"110.692126\" xlink:href=\"#mb2433499a2\" y=\"57.700407\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"113.856191\" xlink:href=\"#mb2433499a2\" y=\"55.604725\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"116.827733\" xlink:href=\"#mb2433499a2\" y=\"53.755022\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"119.630892\" xlink:href=\"#mb2433499a2\" y=\"52.117488\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"122.285062\" xlink:href=\"#mb2433499a2\" y=\"50.664405\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"124.806115\" xlink:href=\"#mb2433499a2\" y=\"49.372664\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"127.207235\" xlink:href=\"#mb2433499a2\" y=\"48.222725\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"129.499519\" xlink:href=\"#mb2433499a2\" y=\"47.197881\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"131.692415\" xlink:href=\"#mb2433499a2\" y=\"46.283724\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"133.79405\" xlink:href=\"#mb2433499a2\" y=\"45.467733\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"135.811475\" xlink:href=\"#mb2433499a2\" y=\"44.738964\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"137.750858\" xlink:href=\"#mb2433499a2\" y=\"44.087809\"/>\n    </g>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 42.620312 143.1 \nL 42.620312 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 237.920313 143.1 \nL 237.920313 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 42.620313 143.1 \nL 237.920313 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 42.620313 7.2 \nL 237.920313 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p008860cf85\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"42.620312\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "KpMv_Mjo84qt",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "6035f118-2a67-4338-8f96-2a2215a5209b"
      },
      "source": [
        "eta = 2\n",
        "d2l.show_trace_2d(f_2d, d2l.train_2d(adagrad_2d))"
      ],
      "execution_count": 37,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "epoch 20, x1 -0.002295, x2 -0.000000\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 245.120313 180.65625\" width=\"245.120313pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 245.120313 180.65625 \nL 245.120313 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 42.620312 143.1 \nL 237.920313 143.1 \nL 237.920313 7.2 \nL 42.620312 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m674bf2e695\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"88.39375\" xlink:href=\"#m674bf2e695\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- −4 -->\n      <defs>\n       <path d=\"M 10.59375 35.5 \nL 73.1875 35.5 \nL 73.1875 27.203125 \nL 10.59375 27.203125 \nz\n\" id=\"DejaVuSans-8722\"/>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(81.022656 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-52\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"149.425\" xlink:href=\"#m674bf2e695\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- −2 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(142.053906 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"210.45625\" xlink:href=\"#m674bf2e695\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n      </defs>\n      <g transform=\"translate(207.275 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_4\">\n     <!-- x1 -->\n     <defs>\n      <path d=\"M 54.890625 54.6875 \nL 35.109375 28.078125 \nL 55.90625 0 \nL 45.3125 0 \nL 29.390625 21.484375 \nL 13.484375 0 \nL 2.875 0 \nL 24.125 28.609375 \nL 4.6875 54.6875 \nL 15.28125 54.6875 \nL 29.78125 35.203125 \nL 44.28125 54.6875 \nz\n\" id=\"DejaVuSans-120\"/>\n      <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n     </defs>\n     <g transform=\"translate(134.129687 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-49\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_4\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m05d0e73bd3\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m05d0e73bd3\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- −3 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 146.899219)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-51\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m05d0e73bd3\" y=\"108.253846\"/>\n      </g>\n     </g>\n     <g id=\"text_6\">\n      <!-- −2 -->\n      <g transform=\"translate(20.878125 112.053065)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_6\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m05d0e73bd3\" y=\"73.407692\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- −1 -->\n      <g transform=\"translate(20.878125 77.206911)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-49\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m05d0e73bd3\" y=\"38.561538\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0 -->\n      <g transform=\"translate(29.257812 42.360757)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_9\">\n     <!-- x2 -->\n     <g transform=\"translate(14.798437 81.290625)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-50\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"LineCollection_1\"/>\n   <g id=\"LineCollection_2\">\n    <path clip-path=\"url(#pff6a8a1918)\" d=\"M 237.920313 80.648723 \nL 234.86875 80.7672 \nL 231.817188 80.871738 \nL 228.765625 80.962338 \nL 225.714063 81.039 \nL 222.6625 81.101723 \nL 219.610938 81.150508 \nL 216.559375 81.185354 \nL 213.507813 81.206262 \nL 210.45625 81.213231 \nL 207.404688 81.206262 \nL 204.353125 81.185354 \nL 201.301563 81.150508 \nL 198.25 81.101723 \nL 195.198438 81.039 \nL 192.146875 80.962338 \nL 189.095313 80.871738 \nL 186.04375 80.7672 \nL 182.992188 80.648723 \nL 179.940625 80.516308 \nL 177.034375 80.376923 \nL 176.889063 80.369348 \nL 173.8375 80.195117 \nL 170.785938 80.005736 \nL 167.734375 79.801204 \nL 164.682813 79.581522 \nL 161.63125 79.346689 \nL 158.579688 79.096706 \nL 155.528125 78.831572 \nL 152.476563 78.551288 \nL 149.425 78.255853 \nL 146.373438 77.945268 \nL 143.321875 77.619532 \nL 140.270313 77.278645 \nL 137.21875 76.922609 \nL 136.969643 76.892308 \nL 134.167188 76.518956 \nL 131.115625 76.095824 \nL 128.064063 75.656099 \nL 125.0125 75.19978 \nL 121.960938 74.726868 \nL 118.909375 74.237363 \nL 115.857813 73.731264 \nL 113.96875 73.407692 \nL 112.80625 73.187611 \nL 109.754688 72.591559 \nL 106.703125 71.977166 \nL 103.651563 71.344433 \nL 100.6 70.69336 \nL 97.548438 70.023947 \nL 97.100875 69.923077 \nL 94.496875 69.267149 \nL 91.445313 68.477986 \nL 88.39375 67.668326 \nL 85.342188 66.838167 \nL 83.908321 66.438462 \nL 82.290625 65.927385 \nL 79.239063 64.940077 \nL 76.1875 63.929538 \nL 73.307374 62.953846 \nL 73.135938 62.886834 \nL 70.084375 61.667219 \nL 67.032813 60.420799 \nL 64.752171 59.469231 \nL 63.98125 59.089091 \nL 60.929688 57.552692 \nL 57.878125 55.984615 \nL 57.878125 55.984615 \nL 54.826563 54.029359 \nL 52.486044 52.5 \nL 51.775 51.902637 \nL 48.723438 49.289176 \nL 48.409725 49.015385 \nL 45.671875 45.670154 \nL 45.559891 45.530769 \nL 43.880132 42.046154 \nL 43.320212 38.561538 \nL 43.880132 35.076923 \nL 45.559891 31.592308 \nL 45.671875 31.452923 \nL 48.409725 28.107692 \nL 48.723438 27.833901 \nL 51.775 25.22044 \nL 52.486044 24.623077 \nL 54.826563 23.093718 \nL 57.878125 21.138462 \nL 57.878125 21.138462 \nL 60.929688 19.570385 \nL 63.98125 18.033986 \nL 64.752171 17.653846 \nL 67.032813 16.702278 \nL 70.084375 15.455858 \nL 73.135938 14.236243 \nL 73.307374 14.169231 \nL 76.1875 13.193538 \nL 79.239063 12.183 \nL 82.290625 11.195692 \nL 83.908321 10.684615 \nL 85.342188 10.28491 \nL 88.39375 9.454751 \nL 91.445313 8.64509 \nL 94.496875 7.855928 \nL 97.100875 7.2 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_3\">\n    <path clip-path=\"url(#pff6a8a1918)\" d=\"M 237.920313 98.491945 \nL 234.86875 98.576571 \nL 231.817188 98.651242 \nL 228.765625 98.715956 \nL 225.714063 98.770714 \nL 222.6625 98.815516 \nL 219.610938 98.850363 \nL 216.559375 98.875253 \nL 213.507813 98.890187 \nL 210.45625 98.895165 \nL 207.404688 98.890187 \nL 204.353125 98.875253 \nL 201.301563 98.850363 \nL 198.25 98.815516 \nL 195.198438 98.770714 \nL 192.146875 98.715956 \nL 189.095313 98.651242 \nL 186.04375 98.576571 \nL 182.992188 98.491945 \nL 179.940625 98.397363 \nL 176.889063 98.292824 \nL 173.8375 98.17833 \nL 170.785938 98.053879 \nL 167.734375 97.919473 \nL 165.208944 97.8 \nL 164.682813 97.773601 \nL 161.63125 97.60993 \nL 158.579688 97.435699 \nL 155.528125 97.250909 \nL 152.476563 97.055559 \nL 149.425 96.84965 \nL 146.373438 96.633182 \nL 143.321875 96.406154 \nL 140.270313 96.168566 \nL 137.21875 95.92042 \nL 134.167188 95.661713 \nL 131.115625 95.392448 \nL 128.064063 95.112622 \nL 125.0125 94.822238 \nL 121.960938 94.521294 \nL 119.943803 94.315385 \nL 118.909375 94.202978 \nL 115.857813 93.860136 \nL 112.80625 93.506055 \nL 109.754688 93.140732 \nL 106.703125 92.764169 \nL 103.651563 92.376365 \nL 100.6 91.97732 \nL 97.548438 91.567035 \nL 94.496875 91.145509 \nL 92.277557 90.830769 \nL 91.445313 90.704602 \nL 88.39375 90.229973 \nL 85.342188 89.743329 \nL 82.290625 89.244668 \nL 79.239063 88.733992 \nL 76.1875 88.2113 \nL 73.135938 87.676592 \nL 71.291587 87.346154 \nL 70.084375 87.113846 \nL 67.032813 86.513718 \nL 63.98125 85.900684 \nL 60.929688 85.274744 \nL 57.878125 84.635897 \nL 54.826563 83.984145 \nL 54.263653 83.861538 \nL 51.775 83.276123 \nL 48.723438 82.544354 \nL 45.671875 81.798646 \nL 42.620313 81.039 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_4\">\n    <path clip-path=\"url(#pff6a8a1918)\" d=\"M 237.920313 112.139597 \nL 234.86875 112.208479 \nL 231.817188 112.269258 \nL 228.765625 112.321932 \nL 225.714063 112.366503 \nL 222.6625 112.40297 \nL 219.610938 112.431333 \nL 216.559375 112.451592 \nL 213.507813 112.463748 \nL 210.45625 112.4678 \nL 207.404688 112.463748 \nL 204.353125 112.451592 \nL 201.301563 112.431333 \nL 198.25 112.40297 \nL 195.198438 112.366503 \nL 192.146875 112.321932 \nL 189.095313 112.269258 \nL 186.04375 112.208479 \nL 182.992188 112.139597 \nL 179.940625 112.062612 \nL 176.889063 111.977522 \nL 173.8375 111.884329 \nL 170.785938 111.783032 \nL 169.542708 111.738462 \nL 167.734375 111.670469 \nL 164.682813 111.547233 \nL 161.63125 111.415497 \nL 158.579688 111.275263 \nL 155.528125 111.126529 \nL 152.476563 110.969296 \nL 149.425 110.803565 \nL 146.373438 110.629334 \nL 143.321875 110.446604 \nL 140.270313 110.255375 \nL 137.21875 110.055647 \nL 134.167188 109.84742 \nL 131.115625 109.630694 \nL 128.064063 109.405469 \nL 125.0125 109.171745 \nL 121.960938 108.929522 \nL 118.909375 108.678799 \nL 115.857813 108.419578 \nL 113.96875 108.253846 \nL 112.80625 108.146627 \nL 109.754688 107.856243 \nL 106.703125 107.556923 \nL 103.651563 107.248669 \nL 100.6 106.931479 \nL 97.548438 106.605355 \nL 94.496875 106.270296 \nL 91.445313 105.926302 \nL 88.39375 105.573373 \nL 85.342188 105.211509 \nL 82.290625 104.84071 \nL 81.716213 104.769231 \nL 79.239063 104.444314 \nL 76.1875 104.034636 \nL 73.135938 103.615541 \nL 70.084375 103.187027 \nL 67.032813 102.749096 \nL 63.98125 102.301746 \nL 60.929688 101.844979 \nL 57.878125 101.378794 \nL 57.273855 101.284615 \nL 54.826563 100.881396 \nL 51.775 100.368659 \nL 48.723438 99.845967 \nL 45.671875 99.313319 \nL 42.620313 98.770714 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_5\">\n    <path clip-path=\"url(#pff6a8a1918)\" d=\"M 237.920313 123.611044 \nL 234.86875 123.671491 \nL 231.817188 123.724827 \nL 228.765625 123.771052 \nL 225.714063 123.810165 \nL 222.6625 123.842166 \nL 219.610938 123.867057 \nL 216.559375 123.884835 \nL 213.507813 123.895502 \nL 210.45625 123.899058 \nL 207.404688 123.895502 \nL 204.353125 123.884835 \nL 201.301563 123.867057 \nL 198.25 123.842166 \nL 195.198438 123.810165 \nL 192.146875 123.771052 \nL 189.095313 123.724827 \nL 186.04375 123.671491 \nL 182.992188 123.611044 \nL 179.940625 123.543485 \nL 176.889063 123.468815 \nL 173.8375 123.387033 \nL 170.785938 123.29814 \nL 167.734375 123.202135 \nL 164.682813 123.099019 \nL 161.63125 122.988791 \nL 158.579688 122.871452 \nL 155.528125 122.747002 \nL 152.476563 122.61544 \nL 149.425 122.476766 \nL 146.373438 122.330981 \nL 143.605741 122.192308 \nL 143.321875 122.17748 \nL 140.270313 122.010663 \nL 137.21875 121.836432 \nL 134.167188 121.654787 \nL 131.115625 121.465728 \nL 128.064063 121.269255 \nL 125.0125 121.065368 \nL 121.960938 120.854067 \nL 118.909375 120.635352 \nL 115.857813 120.409223 \nL 112.80625 120.175679 \nL 109.754688 119.934722 \nL 106.703125 119.68635 \nL 103.651563 119.430565 \nL 100.6 119.167365 \nL 97.548438 118.896751 \nL 95.473375 118.707692 \nL 94.496875 118.614769 \nL 91.445313 118.316641 \nL 88.39375 118.010769 \nL 85.342188 117.697154 \nL 82.290625 117.375795 \nL 79.239063 117.046692 \nL 76.1875 116.709846 \nL 73.135938 116.365256 \nL 70.084375 116.012923 \nL 67.032813 115.652846 \nL 63.98125 115.285026 \nL 63.477899 115.223077 \nL 60.929688 114.894875 \nL 57.878125 114.493739 \nL 54.826563 114.084499 \nL 51.775 113.667156 \nL 48.723438 113.241708 \nL 45.671875 112.808157 \nL 42.620313 112.366503 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_6\">\n    <path clip-path=\"url(#pff6a8a1918)\" d=\"M 237.920313 133.720049 \nL 234.86875 133.773902 \nL 231.817188 133.82142 \nL 228.765625 133.862601 \nL 225.714063 133.897448 \nL 222.6625 133.925958 \nL 219.610938 133.948133 \nL 216.559375 133.963972 \nL 213.507813 133.973476 \nL 210.45625 133.976643 \nL 207.404688 133.973476 \nL 204.353125 133.963972 \nL 201.301563 133.948133 \nL 198.25 133.925958 \nL 195.198438 133.897448 \nL 192.146875 133.862601 \nL 189.095313 133.82142 \nL 186.04375 133.773902 \nL 182.992188 133.720049 \nL 179.940625 133.65986 \nL 176.889063 133.593336 \nL 173.8375 133.520476 \nL 170.785938 133.44128 \nL 167.734375 133.355748 \nL 164.682813 133.263881 \nL 161.63125 133.165678 \nL 158.579688 133.06114 \nL 155.528125 132.950266 \nL 152.476563 132.833056 \nL 149.425 132.70951 \nL 147.936433 132.646154 \nL 146.373438 132.577119 \nL 143.321875 132.435762 \nL 140.270313 132.28783 \nL 137.21875 132.133324 \nL 134.167188 131.972242 \nL 131.115625 131.804586 \nL 128.064063 131.630356 \nL 125.0125 131.44955 \nL 121.960938 131.26217 \nL 118.909375 131.068215 \nL 115.857813 130.867685 \nL 112.80625 130.660581 \nL 109.754688 130.446901 \nL 106.703125 130.226647 \nL 103.651563 129.999819 \nL 100.6 129.766415 \nL 97.548438 129.526437 \nL 94.496875 129.279884 \nL 93.07017 129.161538 \nL 91.445313 129.021471 \nL 88.39375 128.751584 \nL 85.342188 128.474864 \nL 82.290625 128.191312 \nL 79.239063 127.900928 \nL 76.1875 127.60371 \nL 73.135938 127.299661 \nL 70.084375 126.988778 \nL 67.032813 126.671063 \nL 63.98125 126.346516 \nL 60.929688 126.015136 \nL 57.878125 125.676923 \nL 57.878125 125.676923 \nL 54.826563 125.317794 \nL 51.775 124.951554 \nL 48.723438 124.578203 \nL 45.671875 124.197739 \nL 42.620313 123.810165 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_7\">\n    <path clip-path=\"url(#pff6a8a1918)\" d=\"M 210.45625 143.1 \nL 207.404688 143.097047 \nL 204.353125 143.088188 \nL 201.301563 143.073422 \nL 198.25 143.052751 \nL 195.198438 143.026173 \nL 192.146875 142.99369 \nL 189.095313 142.9553 \nL 186.04375 142.911004 \nL 182.992188 142.860802 \nL 179.940625 142.804694 \nL 176.889063 142.742679 \nL 173.8375 142.674759 \nL 170.785938 142.600932 \nL 167.734375 142.521199 \nL 164.682813 142.435561 \nL 161.63125 142.344016 \nL 158.579688 142.246565 \nL 155.528125 142.143207 \nL 152.476563 142.033944 \nL 149.425 141.918774 \nL 146.373438 141.797699 \nL 143.321875 141.670717 \nL 140.270313 141.537829 \nL 137.21875 141.399035 \nL 134.167188 141.254335 \nL 131.115625 141.103729 \nL 128.064063 140.947216 \nL 125.0125 140.784798 \nL 121.960938 140.616473 \nL 118.909375 140.442243 \nL 115.857813 140.262106 \nL 112.80625 140.076063 \nL 109.754688 139.884113 \nL 106.703125 139.686258 \nL 105.641712 139.615385 \nL 103.651563 139.477834 \nL 100.6 139.26081 \nL 97.548438 139.037672 \nL 94.496875 138.808421 \nL 91.445313 138.573057 \nL 88.39375 138.331579 \nL 85.342188 138.083988 \nL 82.290625 137.830283 \nL 79.239063 137.570466 \nL 76.1875 137.304534 \nL 73.135938 137.03249 \nL 70.084375 136.754332 \nL 67.032813 136.470061 \nL 63.98125 136.179676 \nL 63.477899 136.130769 \nL 60.929688 135.874175 \nL 57.878125 135.560559 \nL 54.826563 135.240608 \nL 51.775 134.914322 \nL 48.723438 134.581699 \nL 45.671875 134.242741 \nL 42.620313 133.897448 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pff6a8a1918)\" d=\"M 237.920313 142.860802 \nL 234.86875 142.911004 \nL 231.817188 142.9553 \nL 228.765625 142.99369 \nL 225.714063 143.026173 \nL 222.6625 143.052751 \nL 219.610938 143.073422 \nL 216.559375 143.088188 \nL 213.507813 143.097047 \nL 210.45625 143.1 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_8\">\n    <path clip-path=\"url(#pff6a8a1918)\" d=\"M 43.320212 143.1 \nL 42.620313 143.026173 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_9\"/>\n   <g id=\"line2d_8\">\n    <path clip-path=\"url(#pff6a8a1918)\" d=\"M 57.878125 108.253846 \nL 118.909344 38.561539 \nL 150.30966 38.561538 \nL 169.853409 38.561538 \nL 182.748838 38.561538 \nL 191.458619 38.561538 \nL 197.402109 38.561538 \nL 201.477039 38.561538 \nL 204.277004 38.561538 \nL 206.202903 38.561538 \nL 207.52824 38.561538 \nL 208.440502 38.561538 \nL 209.068503 38.561538 \nL 209.500841 38.561538 \nL 209.798485 38.561538 \nL 210.003401 38.561538 \nL 210.144479 38.561538 \nL 210.241606 38.561538 \nL 210.308474 38.561538 \nL 210.354511 38.561538 \nL 210.386206 38.561538 \n\" style=\"fill:none;stroke:#ff7f0e;stroke-linecap:square;stroke-width:1.5;\"/>\n    <defs>\n     <path d=\"M 0 3 \nC 0.795609 3 1.55874 2.683901 2.12132 2.12132 \nC 2.683901 1.55874 3 0.795609 3 0 \nC 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \nC 1.55874 -2.683901 0.795609 -3 0 -3 \nC -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \nC -2.683901 -1.55874 -3 -0.795609 -3 0 \nC -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \nC -1.55874 2.683901 -0.795609 3 0 3 \nz\n\" id=\"mfea0a6ffe5\" style=\"stroke:#ff7f0e;\"/>\n    </defs>\n    <g clip-path=\"url(#pff6a8a1918)\">\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"57.878125\" xlink:href=\"#mfea0a6ffe5\" y=\"108.253846\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"118.909344\" xlink:href=\"#mfea0a6ffe5\" y=\"38.561539\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"150.30966\" xlink:href=\"#mfea0a6ffe5\" y=\"38.561538\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"169.853409\" xlink:href=\"#mfea0a6ffe5\" y=\"38.561538\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"182.748838\" xlink:href=\"#mfea0a6ffe5\" y=\"38.561538\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"191.458619\" xlink:href=\"#mfea0a6ffe5\" y=\"38.561538\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"197.402109\" xlink:href=\"#mfea0a6ffe5\" y=\"38.561538\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"201.477039\" xlink:href=\"#mfea0a6ffe5\" y=\"38.561538\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"204.277004\" xlink:href=\"#mfea0a6ffe5\" y=\"38.561538\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"206.202903\" xlink:href=\"#mfea0a6ffe5\" y=\"38.561538\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"207.52824\" xlink:href=\"#mfea0a6ffe5\" y=\"38.561538\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"208.440502\" xlink:href=\"#mfea0a6ffe5\" y=\"38.561538\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"209.068503\" xlink:href=\"#mfea0a6ffe5\" y=\"38.561538\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"209.500841\" xlink:href=\"#mfea0a6ffe5\" y=\"38.561538\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"209.798485\" xlink:href=\"#mfea0a6ffe5\" y=\"38.561538\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"210.003401\" xlink:href=\"#mfea0a6ffe5\" y=\"38.561538\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"210.144479\" xlink:href=\"#mfea0a6ffe5\" y=\"38.561538\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"210.241606\" xlink:href=\"#mfea0a6ffe5\" y=\"38.561538\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"210.308474\" xlink:href=\"#mfea0a6ffe5\" y=\"38.561538\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"210.354511\" xlink:href=\"#mfea0a6ffe5\" y=\"38.561538\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"210.386206\" xlink:href=\"#mfea0a6ffe5\" y=\"38.561538\"/>\n    </g>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 42.620312 143.1 \nL 42.620312 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 237.920313 143.1 \nL 237.920313 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 42.620313 143.1 \nL 237.920313 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 42.620313 7.2 \nL 237.920313 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"pff6a8a1918\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"42.620312\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "6puBrTsG9FA1",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "features, labels = d2l.get_data_ch7()\n",
        "\n",
        "def init_adagrad_states():\n",
        "    s_w = nd.zeros((features.shape[1], 1))\n",
        "    s_b = nd.zeros(1)\n",
        "    return (s_w, s_b)\n",
        "\n",
        "def adagrad(params, states, hyperparams):\n",
        "    eps = 1e-6 \n",
        "    for p, s in zip(params, states):\n",
        "        s[:] += p.grad.square()\n",
        "        p[:] -= hyperparams['lr'] * p.grad / (s + eps).sqrt()"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "Ka4BzUvk9-Cj",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "1e354deb-4dd8-41aa-a423-48cb265d5b9d"
      },
      "source": [
        "d2l.train_ch7(adagrad, init_adagrad_states(), {'lr': 0.1}, features, labels)"
      ],
      "execution_count": 39,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "loss: 0.242588, 0.240468 sec per epoch\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 252.64375 180.65625\" width=\"252.64375pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 252.64375 180.65625 \nL 252.64375 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \nL 245.44375 7.2 \nL 50.14375 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m2f0ffb222f\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"59.021023\" xlink:href=\"#m2f0ffb222f\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- 0.0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n       <path d=\"M 10.6875 12.40625 \nL 21 12.40625 \nL 21 0 \nL 10.6875 0 \nz\n\" id=\"DejaVuSans-46\"/>\n      </defs>\n      <g transform=\"translate(51.06946 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"103.407386\" xlink:href=\"#m2f0ffb222f\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- 0.5 -->\n      <defs>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(95.455824 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"147.79375\" xlink:href=\"#m2f0ffb222f\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 1.0 -->\n      <defs>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n      </defs>\n      <g transform=\"translate(139.842187 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"192.180114\" xlink:href=\"#m2f0ffb222f\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 1.5 -->\n      <g transform=\"translate(184.228551 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"236.566477\" xlink:href=\"#m2f0ffb222f\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 2.0 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(228.614915 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_6\">\n     <!-- epoch -->\n     <defs>\n      <path d=\"M 56.203125 29.59375 \nL 56.203125 25.203125 \nL 14.890625 25.203125 \nQ 15.484375 15.921875 20.484375 11.0625 \nQ 25.484375 6.203125 34.421875 6.203125 \nQ 39.59375 6.203125 44.453125 7.46875 \nQ 49.3125 8.734375 54.109375 11.28125 \nL 54.109375 2.78125 \nQ 49.265625 0.734375 44.1875 -0.34375 \nQ 39.109375 -1.421875 33.890625 -1.421875 \nQ 20.796875 -1.421875 13.15625 6.1875 \nQ 5.515625 13.8125 5.515625 26.8125 \nQ 5.515625 40.234375 12.765625 48.109375 \nQ 20.015625 56 32.328125 56 \nQ 43.359375 56 49.78125 48.890625 \nQ 56.203125 41.796875 56.203125 29.59375 \nz\nM 47.21875 32.234375 \nQ 47.125 39.59375 43.09375 43.984375 \nQ 39.0625 48.390625 32.421875 48.390625 \nQ 24.90625 48.390625 20.390625 44.140625 \nQ 15.875 39.890625 15.1875 32.171875 \nz\n\" id=\"DejaVuSans-101\"/>\n      <path d=\"M 18.109375 8.203125 \nL 18.109375 -20.796875 \nL 9.078125 -20.796875 \nL 9.078125 54.6875 \nL 18.109375 54.6875 \nL 18.109375 46.390625 \nQ 20.953125 51.265625 25.265625 53.625 \nQ 29.59375 56 35.59375 56 \nQ 45.5625 56 51.78125 48.09375 \nQ 58.015625 40.1875 58.015625 27.296875 \nQ 58.015625 14.40625 51.78125 6.484375 \nQ 45.5625 -1.421875 35.59375 -1.421875 \nQ 29.59375 -1.421875 25.265625 0.953125 \nQ 20.953125 3.328125 18.109375 8.203125 \nz\nM 48.6875 27.296875 \nQ 48.6875 37.203125 44.609375 42.84375 \nQ 40.53125 48.484375 33.40625 48.484375 \nQ 26.265625 48.484375 22.1875 42.84375 \nQ 18.109375 37.203125 18.109375 27.296875 \nQ 18.109375 17.390625 22.1875 11.75 \nQ 26.265625 6.109375 33.40625 6.109375 \nQ 40.53125 6.109375 44.609375 11.75 \nQ 48.6875 17.390625 48.6875 27.296875 \nz\n\" id=\"DejaVuSans-112\"/>\n      <path d=\"M 30.609375 48.390625 \nQ 23.390625 48.390625 19.1875 42.75 \nQ 14.984375 37.109375 14.984375 27.296875 \nQ 14.984375 17.484375 19.15625 11.84375 \nQ 23.34375 6.203125 30.609375 6.203125 \nQ 37.796875 6.203125 41.984375 11.859375 \nQ 46.1875 17.53125 46.1875 27.296875 \nQ 46.1875 37.015625 41.984375 42.703125 \nQ 37.796875 48.390625 30.609375 48.390625 \nz\nM 30.609375 56 \nQ 42.328125 56 49.015625 48.375 \nQ 55.71875 40.765625 55.71875 27.296875 \nQ 55.71875 13.875 49.015625 6.21875 \nQ 42.328125 -1.421875 30.609375 -1.421875 \nQ 18.84375 -1.421875 12.171875 6.21875 \nQ 5.515625 13.875 5.515625 27.296875 \nQ 5.515625 40.765625 12.171875 48.375 \nQ 18.84375 56 30.609375 56 \nz\n\" id=\"DejaVuSans-111\"/>\n      <path d=\"M 48.78125 52.59375 \nL 48.78125 44.1875 \nQ 44.96875 46.296875 41.140625 47.34375 \nQ 37.3125 48.390625 33.40625 48.390625 \nQ 24.65625 48.390625 19.8125 42.84375 \nQ 14.984375 37.3125 14.984375 27.296875 \nQ 14.984375 17.28125 19.8125 11.734375 \nQ 24.65625 6.203125 33.40625 6.203125 \nQ 37.3125 6.203125 41.140625 7.25 \nQ 44.96875 8.296875 48.78125 10.40625 \nL 48.78125 2.09375 \nQ 45.015625 0.34375 40.984375 -0.53125 \nQ 36.96875 -1.421875 32.421875 -1.421875 \nQ 20.0625 -1.421875 12.78125 6.34375 \nQ 5.515625 14.109375 5.515625 27.296875 \nQ 5.515625 40.671875 12.859375 48.328125 \nQ 20.21875 56 33.015625 56 \nQ 37.15625 56 41.109375 55.140625 \nQ 45.0625 54.296875 48.78125 52.59375 \nz\n\" id=\"DejaVuSans-99\"/>\n      <path d=\"M 54.890625 33.015625 \nL 54.890625 0 \nL 45.90625 0 \nL 45.90625 32.71875 \nQ 45.90625 40.484375 42.875 44.328125 \nQ 39.84375 48.1875 33.796875 48.1875 \nQ 26.515625 48.1875 22.3125 43.546875 \nQ 18.109375 38.921875 18.109375 30.90625 \nL 18.109375 0 \nL 9.078125 0 \nL 9.078125 75.984375 \nL 18.109375 75.984375 \nL 18.109375 46.1875 \nQ 21.34375 51.125 25.703125 53.5625 \nQ 30.078125 56 35.796875 56 \nQ 45.21875 56 50.046875 50.171875 \nQ 54.890625 44.34375 54.890625 33.015625 \nz\n\" id=\"DejaVuSans-104\"/>\n     </defs>\n     <g transform=\"translate(132.565625 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-101\"/>\n      <use x=\"61.523438\" xlink:href=\"#DejaVuSans-112\"/>\n      <use x=\"125\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"186.181641\" xlink:href=\"#DejaVuSans-99\"/>\n      <use x=\"241.162109\" xlink:href=\"#DejaVuSans-104\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_6\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m898a15cf95\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m898a15cf95\" y=\"133.307599\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0.25 -->\n      <g transform=\"translate(20.878125 137.106818)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m898a15cf95\" y=\"109.331812\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0.30 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 113.13103)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m898a15cf95\" y=\"85.356024\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 0.35 -->\n      <g transform=\"translate(20.878125 89.155243)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m898a15cf95\" y=\"61.380237\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 0.40 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(20.878125 65.179456)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m898a15cf95\" y=\"37.404449\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 0.45 -->\n      <g transform=\"translate(20.878125 41.203668)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_11\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m898a15cf95\" y=\"13.428662\"/>\n      </g>\n     </g>\n     <g id=\"text_12\">\n      <!-- 0.50 -->\n      <g transform=\"translate(20.878125 17.227881)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_13\">\n     <!-- loss -->\n     <defs>\n      <path d=\"M 9.421875 75.984375 \nL 18.40625 75.984375 \nL 18.40625 0 \nL 9.421875 0 \nz\n\" id=\"DejaVuSans-108\"/>\n      <path d=\"M 44.28125 53.078125 \nL 44.28125 44.578125 \nQ 40.484375 46.53125 36.375 47.5 \nQ 32.28125 48.484375 27.875 48.484375 \nQ 21.1875 48.484375 17.84375 46.4375 \nQ 14.5 44.390625 14.5 40.28125 \nQ 14.5 37.15625 16.890625 35.375 \nQ 19.28125 33.59375 26.515625 31.984375 \nL 29.59375 31.296875 \nQ 39.15625 29.25 43.1875 25.515625 \nQ 47.21875 21.78125 47.21875 15.09375 \nQ 47.21875 7.46875 41.1875 3.015625 \nQ 35.15625 -1.421875 24.609375 -1.421875 \nQ 20.21875 -1.421875 15.453125 -0.5625 \nQ 10.6875 0.296875 5.421875 2 \nL 5.421875 11.28125 \nQ 10.40625 8.6875 15.234375 7.390625 \nQ 20.0625 6.109375 24.8125 6.109375 \nQ 31.15625 6.109375 34.5625 8.28125 \nQ 37.984375 10.453125 37.984375 14.40625 \nQ 37.984375 18.0625 35.515625 20.015625 \nQ 33.0625 21.96875 24.703125 23.78125 \nL 21.578125 24.515625 \nQ 13.234375 26.265625 9.515625 29.90625 \nQ 5.8125 33.546875 5.8125 39.890625 \nQ 5.8125 47.609375 11.28125 51.796875 \nQ 16.75 56 26.8125 56 \nQ 31.78125 56 36.171875 55.265625 \nQ 40.578125 54.546875 44.28125 53.078125 \nz\n\" id=\"DejaVuSans-115\"/>\n     </defs>\n     <g transform=\"translate(14.798437 84.807812)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-108\"/>\n      <use x=\"27.783203\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"88.964844\" xlink:href=\"#DejaVuSans-115\"/>\n      <use x=\"141.064453\" xlink:href=\"#DejaVuSans-115\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_12\">\n    <path clip-path=\"url(#pe8706db54f)\" d=\"M 59.021023 13.377273 \nL 64.939205 108.384019 \nL 70.857386 122.814922 \nL 76.775568 130.353015 \nL 82.69375 134.114701 \nL 88.611932 133.962898 \nL 94.530114 133.100598 \nL 100.448295 132.860886 \nL 106.366477 134.377271 \nL 112.284659 134.863447 \nL 118.202841 136.487126 \nL 124.121023 135.977927 \nL 130.039205 135.75615 \nL 135.957386 136.268028 \nL 141.875568 135.84088 \nL 147.79375 135.887746 \nL 153.711932 134.17683 \nL 159.630114 135.828125 \nL 165.548295 136.40574 \nL 171.466477 136.325498 \nL 177.384659 136.434372 \nL 183.302841 135.884895 \nL 189.221023 136.151809 \nL 195.139205 136.922727 \nL 201.057386 136.050788 \nL 206.975568 136.625174 \nL 212.89375 136.773082 \nL 218.811932 136.150266 \nL 224.730114 136.251758 \nL 230.648295 136.327013 \nL 236.566477 136.861706 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 50.14375 143.1 \nL 50.14375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 245.44375 143.1 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 50.14375 7.2 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"pe8706db54f\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"50.14375\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "Zge2De9T-IsF",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "6ea6b009-5ed9-4896-aae6-209d77eec30c"
      },
      "source": [
        "d2l.train_gluon_ch7('adagrad', {'learning_rate': 0.1}, features, labels)"
      ],
      "execution_count": 40,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "loss: 0.242942, 0.234397 sec per epoch\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 252.64375 180.65625\" width=\"252.64375pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 252.64375 180.65625 \nL 252.64375 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \nL 245.44375 7.2 \nL 50.14375 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m7b434b1862\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"59.021023\" xlink:href=\"#m7b434b1862\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- 0.0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n       <path d=\"M 10.6875 12.40625 \nL 21 12.40625 \nL 21 0 \nL 10.6875 0 \nz\n\" id=\"DejaVuSans-46\"/>\n      </defs>\n      <g transform=\"translate(51.06946 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"103.407386\" xlink:href=\"#m7b434b1862\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- 0.5 -->\n      <defs>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(95.455824 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"147.79375\" xlink:href=\"#m7b434b1862\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 1.0 -->\n      <defs>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n      </defs>\n      <g transform=\"translate(139.842187 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"192.180114\" xlink:href=\"#m7b434b1862\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 1.5 -->\n      <g transform=\"translate(184.228551 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"236.566477\" xlink:href=\"#m7b434b1862\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 2.0 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(228.614915 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_6\">\n     <!-- epoch -->\n     <defs>\n      <path d=\"M 56.203125 29.59375 \nL 56.203125 25.203125 \nL 14.890625 25.203125 \nQ 15.484375 15.921875 20.484375 11.0625 \nQ 25.484375 6.203125 34.421875 6.203125 \nQ 39.59375 6.203125 44.453125 7.46875 \nQ 49.3125 8.734375 54.109375 11.28125 \nL 54.109375 2.78125 \nQ 49.265625 0.734375 44.1875 -0.34375 \nQ 39.109375 -1.421875 33.890625 -1.421875 \nQ 20.796875 -1.421875 13.15625 6.1875 \nQ 5.515625 13.8125 5.515625 26.8125 \nQ 5.515625 40.234375 12.765625 48.109375 \nQ 20.015625 56 32.328125 56 \nQ 43.359375 56 49.78125 48.890625 \nQ 56.203125 41.796875 56.203125 29.59375 \nz\nM 47.21875 32.234375 \nQ 47.125 39.59375 43.09375 43.984375 \nQ 39.0625 48.390625 32.421875 48.390625 \nQ 24.90625 48.390625 20.390625 44.140625 \nQ 15.875 39.890625 15.1875 32.171875 \nz\n\" id=\"DejaVuSans-101\"/>\n      <path d=\"M 18.109375 8.203125 \nL 18.109375 -20.796875 \nL 9.078125 -20.796875 \nL 9.078125 54.6875 \nL 18.109375 54.6875 \nL 18.109375 46.390625 \nQ 20.953125 51.265625 25.265625 53.625 \nQ 29.59375 56 35.59375 56 \nQ 45.5625 56 51.78125 48.09375 \nQ 58.015625 40.1875 58.015625 27.296875 \nQ 58.015625 14.40625 51.78125 6.484375 \nQ 45.5625 -1.421875 35.59375 -1.421875 \nQ 29.59375 -1.421875 25.265625 0.953125 \nQ 20.953125 3.328125 18.109375 8.203125 \nz\nM 48.6875 27.296875 \nQ 48.6875 37.203125 44.609375 42.84375 \nQ 40.53125 48.484375 33.40625 48.484375 \nQ 26.265625 48.484375 22.1875 42.84375 \nQ 18.109375 37.203125 18.109375 27.296875 \nQ 18.109375 17.390625 22.1875 11.75 \nQ 26.265625 6.109375 33.40625 6.109375 \nQ 40.53125 6.109375 44.609375 11.75 \nQ 48.6875 17.390625 48.6875 27.296875 \nz\n\" id=\"DejaVuSans-112\"/>\n      <path d=\"M 30.609375 48.390625 \nQ 23.390625 48.390625 19.1875 42.75 \nQ 14.984375 37.109375 14.984375 27.296875 \nQ 14.984375 17.484375 19.15625 11.84375 \nQ 23.34375 6.203125 30.609375 6.203125 \nQ 37.796875 6.203125 41.984375 11.859375 \nQ 46.1875 17.53125 46.1875 27.296875 \nQ 46.1875 37.015625 41.984375 42.703125 \nQ 37.796875 48.390625 30.609375 48.390625 \nz\nM 30.609375 56 \nQ 42.328125 56 49.015625 48.375 \nQ 55.71875 40.765625 55.71875 27.296875 \nQ 55.71875 13.875 49.015625 6.21875 \nQ 42.328125 -1.421875 30.609375 -1.421875 \nQ 18.84375 -1.421875 12.171875 6.21875 \nQ 5.515625 13.875 5.515625 27.296875 \nQ 5.515625 40.765625 12.171875 48.375 \nQ 18.84375 56 30.609375 56 \nz\n\" id=\"DejaVuSans-111\"/>\n      <path d=\"M 48.78125 52.59375 \nL 48.78125 44.1875 \nQ 44.96875 46.296875 41.140625 47.34375 \nQ 37.3125 48.390625 33.40625 48.390625 \nQ 24.65625 48.390625 19.8125 42.84375 \nQ 14.984375 37.3125 14.984375 27.296875 \nQ 14.984375 17.28125 19.8125 11.734375 \nQ 24.65625 6.203125 33.40625 6.203125 \nQ 37.3125 6.203125 41.140625 7.25 \nQ 44.96875 8.296875 48.78125 10.40625 \nL 48.78125 2.09375 \nQ 45.015625 0.34375 40.984375 -0.53125 \nQ 36.96875 -1.421875 32.421875 -1.421875 \nQ 20.0625 -1.421875 12.78125 6.34375 \nQ 5.515625 14.109375 5.515625 27.296875 \nQ 5.515625 40.671875 12.859375 48.328125 \nQ 20.21875 56 33.015625 56 \nQ 37.15625 56 41.109375 55.140625 \nQ 45.0625 54.296875 48.78125 52.59375 \nz\n\" id=\"DejaVuSans-99\"/>\n      <path d=\"M 54.890625 33.015625 \nL 54.890625 0 \nL 45.90625 0 \nL 45.90625 32.71875 \nQ 45.90625 40.484375 42.875 44.328125 \nQ 39.84375 48.1875 33.796875 48.1875 \nQ 26.515625 48.1875 22.3125 43.546875 \nQ 18.109375 38.921875 18.109375 30.90625 \nL 18.109375 0 \nL 9.078125 0 \nL 9.078125 75.984375 \nL 18.109375 75.984375 \nL 18.109375 46.1875 \nQ 21.34375 51.125 25.703125 53.5625 \nQ 30.078125 56 35.796875 56 \nQ 45.21875 56 50.046875 50.171875 \nQ 54.890625 44.34375 54.890625 33.015625 \nz\n\" id=\"DejaVuSans-104\"/>\n     </defs>\n     <g transform=\"translate(132.565625 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-101\"/>\n      <use x=\"61.523438\" xlink:href=\"#DejaVuSans-112\"/>\n      <use x=\"125\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"186.181641\" xlink:href=\"#DejaVuSans-99\"/>\n      <use x=\"241.162109\" xlink:href=\"#DejaVuSans-104\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_6\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m52b1294756\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m52b1294756\" y=\"133.48391\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0.25 -->\n      <g transform=\"translate(20.878125 137.283129)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m52b1294756\" y=\"109.122712\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0.30 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 112.921931)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m52b1294756\" y=\"84.761515\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 0.35 -->\n      <g transform=\"translate(20.878125 88.560733)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m52b1294756\" y=\"60.400317\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 0.40 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(20.878125 64.199535)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m52b1294756\" y=\"36.039119\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 0.45 -->\n      <g transform=\"translate(20.878125 39.838337)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_11\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m52b1294756\" y=\"11.677921\"/>\n      </g>\n     </g>\n     <g id=\"text_12\">\n      <!-- 0.50 -->\n      <g transform=\"translate(20.878125 15.477139)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_13\">\n     <!-- loss -->\n     <defs>\n      <path d=\"M 9.421875 75.984375 \nL 18.40625 75.984375 \nL 18.40625 0 \nL 9.421875 0 \nz\n\" id=\"DejaVuSans-108\"/>\n      <path d=\"M 44.28125 53.078125 \nL 44.28125 44.578125 \nQ 40.484375 46.53125 36.375 47.5 \nQ 32.28125 48.484375 27.875 48.484375 \nQ 21.1875 48.484375 17.84375 46.4375 \nQ 14.5 44.390625 14.5 40.28125 \nQ 14.5 37.15625 16.890625 35.375 \nQ 19.28125 33.59375 26.515625 31.984375 \nL 29.59375 31.296875 \nQ 39.15625 29.25 43.1875 25.515625 \nQ 47.21875 21.78125 47.21875 15.09375 \nQ 47.21875 7.46875 41.1875 3.015625 \nQ 35.15625 -1.421875 24.609375 -1.421875 \nQ 20.21875 -1.421875 15.453125 -0.5625 \nQ 10.6875 0.296875 5.421875 2 \nL 5.421875 11.28125 \nQ 10.40625 8.6875 15.234375 7.390625 \nQ 20.0625 6.109375 24.8125 6.109375 \nQ 31.15625 6.109375 34.5625 8.28125 \nQ 37.984375 10.453125 37.984375 14.40625 \nQ 37.984375 18.0625 35.515625 20.015625 \nQ 33.0625 21.96875 24.703125 23.78125 \nL 21.578125 24.515625 \nQ 13.234375 26.265625 9.515625 29.90625 \nQ 5.8125 33.546875 5.8125 39.890625 \nQ 5.8125 47.609375 11.28125 51.796875 \nQ 16.75 56 26.8125 56 \nQ 31.78125 56 36.171875 55.265625 \nQ 40.578125 54.546875 44.28125 53.078125 \nz\n\" id=\"DejaVuSans-115\"/>\n     </defs>\n     <g transform=\"translate(14.798437 84.807812)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-108\"/>\n      <use x=\"27.783203\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"88.964844\" xlink:href=\"#DejaVuSans-115\"/>\n      <use x=\"141.064453\" xlink:href=\"#DejaVuSans-115\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_12\">\n    <path clip-path=\"url(#pc9e3a662f7)\" d=\"M 59.021023 13.377273 \nL 64.939205 114.628656 \nL 70.857386 119.018218 \nL 76.775568 129.174719 \nL 82.69375 130.919229 \nL 88.611932 133.527007 \nL 94.530114 134.385011 \nL 100.448295 132.567208 \nL 106.366477 134.362656 \nL 112.284659 134.742387 \nL 118.202841 135.062366 \nL 124.121023 135.806377 \nL 130.039205 135.946092 \nL 135.957386 135.87439 \nL 141.875568 135.92543 \nL 147.79375 136.544115 \nL 153.711932 135.08803 \nL 159.630114 134.263511 \nL 165.548295 134.588405 \nL 171.466477 133.334365 \nL 177.384659 134.955285 \nL 183.302841 136.187029 \nL 189.221023 136.590725 \nL 195.139205 136.851338 \nL 201.057386 136.227505 \nL 206.975568 136.402418 \nL 212.89375 136.448469 \nL 218.811932 136.223657 \nL 224.730114 136.10125 \nL 230.648295 136.500169 \nL 236.566477 136.922727 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 50.14375 143.1 \nL 50.14375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 245.44375 143.1 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 50.14375 7.2 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"pc9e3a662f7\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"50.14375\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "wI1r-dKL-ZhQ",
        "colab_type": "text"
      },
      "source": [
        "## 7.6 RMSProp 算法"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "PqxugUoE-9F4",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 284
        },
        "outputId": "2f48dcc4-d22a-4109-c72d-48fc69787dc1"
      },
      "source": [
        "%matplotlib inline\n",
        "import d2lzh as d2l \n",
        "import math \n",
        "from mxnet import nd \n",
        "\n",
        "def rmsprop_2d(x1, x2, s1, s2):\n",
        "    g1, g2, eps = 0.2 * x1, 4 * x2, 1e-6\n",
        "    s1 = gamma * s1 + (1 - gamma) * g1 ** 2 \n",
        "    s2 = gamma * s2 + (1 - gamma) * g2 ** 2 \n",
        "    x1 -= eta / math.sqrt(s1 + eps) * g1 \n",
        "    x2 -= eta / math.sqrt(s2 + eps) * g2 \n",
        "    return x1, x2, s1, s2 \n",
        "\n",
        "def f_2d(x1, x2):\n",
        "    return 0.1 * x1 ** 2 + 2 * x2 ** 2 \n",
        "\n",
        "eta, gamma = 0.4, 0.9 \n",
        "d2l.show_trace_2d(f_2d, d2l.train_2d(rmsprop_2d))"
      ],
      "execution_count": 42,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "epoch 20, x1 -0.010599, x2 0.000000\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"184.455469pt\" version=\"1.1\" viewBox=\"0 0 245.120313 184.455469\" width=\"245.120313pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 184.455469 \nL 245.120313 184.455469 \nL 245.120313 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 42.620312 146.899219 \nL 237.920313 146.899219 \nL 237.920313 10.999219 \nL 42.620312 10.999219 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m624b50f9e2\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"88.39375\" xlink:href=\"#m624b50f9e2\" y=\"146.899219\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- −4 -->\n      <defs>\n       <path d=\"M 10.59375 35.5 \nL 73.1875 35.5 \nL 73.1875 27.203125 \nL 10.59375 27.203125 \nz\n\" id=\"DejaVuSans-8722\"/>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(81.022656 161.497656)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-52\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"149.425\" xlink:href=\"#m624b50f9e2\" y=\"146.899219\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- −2 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(142.053906 161.497656)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"210.45625\" xlink:href=\"#m624b50f9e2\" y=\"146.899219\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n      </defs>\n      <g transform=\"translate(207.275 161.497656)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_4\">\n     <!-- x1 -->\n     <defs>\n      <path d=\"M 54.890625 54.6875 \nL 35.109375 28.078125 \nL 55.90625 0 \nL 45.3125 0 \nL 29.390625 21.484375 \nL 13.484375 0 \nL 2.875 0 \nL 24.125 28.609375 \nL 4.6875 54.6875 \nL 15.28125 54.6875 \nL 29.78125 35.203125 \nL 44.28125 54.6875 \nz\n\" id=\"DejaVuSans-120\"/>\n      <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n     </defs>\n     <g transform=\"translate(134.129687 175.175781)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-49\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_4\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m882b9ed8f4\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m882b9ed8f4\" y=\"146.899219\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- −3 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 150.698437)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-51\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m882b9ed8f4\" y=\"112.924219\"/>\n      </g>\n     </g>\n     <g id=\"text_6\">\n      <!-- −2 -->\n      <g transform=\"translate(20.878125 116.723437)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_6\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m882b9ed8f4\" y=\"78.949219\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- −1 -->\n      <g transform=\"translate(20.878125 82.748437)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-49\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m882b9ed8f4\" y=\"44.974219\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0 -->\n      <g transform=\"translate(29.257812 48.773437)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m882b9ed8f4\" y=\"10.999219\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 1 -->\n      <g transform=\"translate(29.257812 14.798437)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_10\">\n     <!-- x2 -->\n     <g transform=\"translate(14.798437 85.089844)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-50\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"LineCollection_1\"/>\n   <g id=\"LineCollection_2\">\n    <path clip-path=\"url(#pd05c034e8e)\" d=\"M 237.920313 86.009224 \nL 234.86875 86.124739 \nL 231.817188 86.226664 \nL 228.765625 86.314999 \nL 225.714063 86.389744 \nL 222.6625 86.450899 \nL 219.610938 86.498464 \nL 216.559375 86.532439 \nL 213.507813 86.552824 \nL 210.45625 86.559619 \nL 207.404688 86.552824 \nL 204.353125 86.532439 \nL 201.301563 86.498464 \nL 198.25 86.450899 \nL 195.198438 86.389744 \nL 192.146875 86.314999 \nL 189.095313 86.226664 \nL 186.04375 86.124739 \nL 182.992188 86.009224 \nL 179.940625 85.880119 \nL 177.034375 85.744219 \nL 176.889063 85.736833 \nL 173.8375 85.566958 \nL 170.785938 85.382311 \nL 167.734375 85.182893 \nL 164.682813 84.968702 \nL 161.63125 84.73974 \nL 158.579688 84.496007 \nL 155.528125 84.237501 \nL 152.476563 83.964224 \nL 149.425 83.676175 \nL 146.373438 83.373355 \nL 143.321875 83.055762 \nL 140.270313 82.723398 \nL 137.21875 82.376262 \nL 136.969643 82.346719 \nL 134.167188 81.982701 \nL 131.115625 81.570147 \nL 128.064063 81.141415 \nL 125.0125 80.696504 \nL 121.960938 80.235415 \nL 118.909375 79.758147 \nL 115.857813 79.264701 \nL 113.96875 78.949219 \nL 112.80625 78.73464 \nL 109.754688 78.153488 \nL 106.703125 77.554456 \nL 103.651563 76.937541 \nL 100.6 76.302745 \nL 97.548438 75.650067 \nL 97.100875 75.551719 \nL 94.496875 74.912189 \nL 91.445313 74.142756 \nL 88.39375 73.353336 \nL 85.342188 72.543932 \nL 83.908321 72.154219 \nL 82.290625 71.655919 \nL 79.239063 70.693294 \nL 76.1875 69.708019 \nL 73.307374 68.756719 \nL 73.135938 68.691382 \nL 70.084375 67.502257 \nL 67.032813 66.286998 \nL 64.752171 65.359219 \nL 63.98125 64.988582 \nL 60.929688 63.490594 \nL 57.878125 61.961719 \nL 57.878125 61.961719 \nL 54.826563 60.055344 \nL 52.486044 58.564219 \nL 51.775 57.98179 \nL 48.723438 55.433665 \nL 48.409725 55.166719 \nL 45.671875 51.905119 \nL 45.559891 51.769219 \nL 43.880132 48.371719 \nL 43.320212 44.974219 \nL 43.880132 41.576719 \nL 45.559891 38.179219 \nL 45.671875 38.043319 \nL 48.409725 34.781719 \nL 48.723438 34.514772 \nL 51.775 31.966647 \nL 52.486044 31.384219 \nL 54.826563 29.893094 \nL 57.878125 27.986719 \nL 57.878125 27.986719 \nL 60.929688 26.457844 \nL 63.98125 24.959855 \nL 64.752171 24.589219 \nL 67.032813 23.66144 \nL 70.084375 22.44618 \nL 73.135938 21.257055 \nL 73.307374 21.191719 \nL 76.1875 20.240419 \nL 79.239063 19.255144 \nL 82.290625 18.292519 \nL 83.908321 17.794219 \nL 85.342188 17.404506 \nL 88.39375 16.595101 \nL 91.445313 15.805682 \nL 94.496875 15.036248 \nL 97.100875 14.396719 \nL 97.548438 14.29837 \nL 100.6 13.645692 \nL 103.651563 13.010896 \nL 106.703125 12.393982 \nL 109.754688 11.794949 \nL 112.80625 11.213798 \nL 113.96875 10.999219 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_3\">\n    <path clip-path=\"url(#pd05c034e8e)\" d=\"M 237.920313 103.406365 \nL 234.86875 103.488876 \nL 231.817188 103.561679 \nL 228.765625 103.624776 \nL 225.714063 103.678165 \nL 222.6625 103.721847 \nL 219.610938 103.755822 \nL 216.559375 103.78009 \nL 213.507813 103.794651 \nL 210.45625 103.799504 \nL 207.404688 103.794651 \nL 204.353125 103.78009 \nL 201.301563 103.755822 \nL 198.25 103.721847 \nL 195.198438 103.678165 \nL 192.146875 103.624776 \nL 189.095313 103.561679 \nL 186.04375 103.488876 \nL 182.992188 103.406365 \nL 179.940625 103.314147 \nL 176.889063 103.212222 \nL 173.8375 103.10059 \nL 170.785938 102.979251 \nL 167.734375 102.848204 \nL 165.208944 102.731719 \nL 164.682813 102.70598 \nL 161.63125 102.546401 \nL 158.579688 102.376526 \nL 155.528125 102.196355 \nL 152.476563 102.005889 \nL 149.425 101.805128 \nL 146.373438 101.594071 \nL 143.321875 101.372719 \nL 140.270313 101.141071 \nL 137.21875 100.899128 \nL 134.167188 100.646889 \nL 131.115625 100.384355 \nL 128.064063 100.111526 \nL 125.0125 99.828401 \nL 121.960938 99.53498 \nL 119.943803 99.334219 \nL 118.909375 99.224622 \nL 115.857813 98.890352 \nL 112.80625 98.545122 \nL 109.754688 98.188932 \nL 106.703125 97.821783 \nL 103.651563 97.443674 \nL 100.6 97.054606 \nL 97.548438 96.654578 \nL 94.496875 96.24359 \nL 92.277557 95.936719 \nL 91.445313 95.813706 \nL 88.39375 95.350943 \nL 85.342188 94.876464 \nL 82.290625 94.39027 \nL 79.239063 93.892361 \nL 76.1875 93.382736 \nL 73.135938 92.861395 \nL 71.291587 92.539219 \nL 70.084375 92.312719 \nL 67.032813 91.727594 \nL 63.98125 91.129885 \nL 60.929688 90.519594 \nL 57.878125 89.896719 \nL 54.826563 89.26126 \nL 54.263653 89.141719 \nL 51.775 88.570939 \nL 48.723438 87.857464 \nL 45.671875 87.130399 \nL 42.620313 86.389744 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_4\">\n    <path clip-path=\"url(#pd05c034e8e)\" d=\"M 237.920313 116.712826 \nL 234.86875 116.779986 \nL 231.817188 116.839245 \nL 228.765625 116.890602 \nL 225.714063 116.934059 \nL 222.6625 116.969614 \nL 219.610938 116.997268 \nL 216.559375 117.017021 \nL 213.507813 117.028873 \nL 210.45625 117.032823 \nL 207.404688 117.028873 \nL 204.353125 117.017021 \nL 201.301563 116.997268 \nL 198.25 116.969614 \nL 195.198438 116.934059 \nL 192.146875 116.890602 \nL 189.095313 116.839245 \nL 186.04375 116.779986 \nL 182.992188 116.712826 \nL 179.940625 116.637765 \nL 176.889063 116.554803 \nL 173.8375 116.46394 \nL 170.785938 116.365175 \nL 169.542708 116.321719 \nL 167.734375 116.255426 \nL 164.682813 116.135271 \nL 161.63125 116.006829 \nL 158.579688 115.8701 \nL 155.528125 115.725085 \nL 152.476563 115.571783 \nL 149.425 115.410194 \nL 146.373438 115.240319 \nL 143.321875 115.062158 \nL 140.270313 114.87571 \nL 137.21875 114.680975 \nL 134.167188 114.477954 \nL 131.115625 114.266646 \nL 128.064063 114.047051 \nL 125.0125 113.81917 \nL 121.960938 113.583002 \nL 118.909375 113.338548 \nL 115.857813 113.085807 \nL 113.96875 112.924219 \nL 112.80625 112.81968 \nL 109.754688 112.536555 \nL 106.703125 112.244719 \nL 103.651563 111.944171 \nL 100.6 111.634911 \nL 97.548438 111.31694 \nL 94.496875 110.990257 \nL 91.445313 110.654863 \nL 88.39375 110.310757 \nL 85.342188 109.95794 \nL 82.290625 109.596411 \nL 81.716213 109.526719 \nL 79.239063 109.209925 \nL 76.1875 108.810489 \nL 73.135938 108.401871 \nL 70.084375 107.98407 \nL 67.032813 107.557087 \nL 63.98125 107.120921 \nL 60.929688 106.675573 \nL 57.878125 106.221043 \nL 57.273855 106.129219 \nL 54.826563 105.736079 \nL 51.775 105.236162 \nL 48.723438 104.726537 \nL 45.671875 104.207204 \nL 42.620313 103.678165 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_5\">\n    <path clip-path=\"url(#pd05c034e8e)\" d=\"M 237.920313 127.897487 \nL 234.86875 127.956423 \nL 231.817188 128.008425 \nL 228.765625 128.053494 \nL 225.714063 128.091629 \nL 222.6625 128.122831 \nL 219.610938 128.147099 \nL 216.559375 128.164433 \nL 213.507813 128.174834 \nL 210.45625 128.1783 \nL 207.404688 128.174834 \nL 204.353125 128.164433 \nL 201.301563 128.147099 \nL 198.25 128.122831 \nL 195.198438 128.091629 \nL 192.146875 128.053494 \nL 189.095313 128.008425 \nL 186.04375 127.956423 \nL 182.992188 127.897487 \nL 179.940625 127.831617 \nL 176.889063 127.758813 \nL 173.8375 127.679076 \nL 170.785938 127.592405 \nL 167.734375 127.4988 \nL 164.682813 127.398262 \nL 161.63125 127.29079 \nL 158.579688 127.176385 \nL 155.528125 127.055045 \nL 152.476563 126.926772 \nL 149.425 126.791566 \nL 146.373438 126.649425 \nL 143.605741 126.514219 \nL 143.321875 126.499761 \nL 140.270313 126.337115 \nL 137.21875 126.16724 \nL 134.167188 125.990136 \nL 131.115625 125.805804 \nL 128.064063 125.614243 \nL 125.0125 125.415453 \nL 121.960938 125.209434 \nL 118.909375 124.996187 \nL 115.857813 124.775711 \nL 112.80625 124.548006 \nL 109.754688 124.313072 \nL 106.703125 124.07091 \nL 103.651563 123.821519 \nL 100.6 123.5649 \nL 97.548438 123.301051 \nL 95.473375 123.116719 \nL 94.496875 123.026119 \nL 91.445313 122.735444 \nL 88.39375 122.437219 \nL 85.342188 122.131444 \nL 82.290625 121.818119 \nL 79.239063 121.497244 \nL 76.1875 121.168819 \nL 73.135938 120.832844 \nL 70.084375 120.489319 \nL 67.032813 120.138244 \nL 63.98125 119.779619 \nL 63.477899 119.719219 \nL 60.929688 119.399222 \nL 57.878125 119.008114 \nL 54.826563 118.609105 \nL 51.775 118.202195 \nL 48.723438 117.787384 \nL 45.671875 117.364672 \nL 42.620313 116.934059 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_6\">\n    <path clip-path=\"url(#pd05c034e8e)\" d=\"M 237.920313 137.753766 \nL 234.86875 137.806273 \nL 231.817188 137.852603 \nL 228.765625 137.892755 \nL 225.714063 137.92673 \nL 222.6625 137.954528 \nL 219.610938 137.976148 \nL 216.559375 137.991591 \nL 213.507813 138.000857 \nL 210.45625 138.003946 \nL 207.404688 138.000857 \nL 204.353125 137.991591 \nL 201.301563 137.976148 \nL 198.25 137.954528 \nL 195.198438 137.92673 \nL 192.146875 137.892755 \nL 189.095313 137.852603 \nL 186.04375 137.806273 \nL 182.992188 137.753766 \nL 179.940625 137.695082 \nL 176.889063 137.630221 \nL 173.8375 137.559182 \nL 170.785938 137.481966 \nL 167.734375 137.398573 \nL 164.682813 137.309003 \nL 161.63125 137.213255 \nL 158.579688 137.11133 \nL 155.528125 137.003228 \nL 152.476563 136.888948 \nL 149.425 136.768491 \nL 147.936433 136.706719 \nL 146.373438 136.63941 \nL 143.321875 136.501587 \nL 140.270313 136.357353 \nL 137.21875 136.206709 \nL 134.167188 136.049655 \nL 131.115625 135.88619 \nL 128.064063 135.716315 \nL 125.0125 135.54003 \nL 121.960938 135.357334 \nL 118.909375 135.168228 \nL 115.857813 134.972712 \nL 112.80625 134.770785 \nL 109.754688 134.562448 \nL 106.703125 134.3477 \nL 103.651563 134.126542 \nL 100.6 133.898973 \nL 97.548438 133.664995 \nL 94.496875 133.424606 \nL 93.07017 133.309219 \nL 91.445313 133.172653 \nL 88.39375 132.909513 \nL 85.342188 132.639711 \nL 82.290625 132.363248 \nL 79.239063 132.080123 \nL 76.1875 131.790336 \nL 73.135938 131.493888 \nL 70.084375 131.190778 \nL 67.032813 130.881006 \nL 63.98125 130.564572 \nL 60.929688 130.241476 \nL 57.878125 129.911719 \nL 57.878125 129.911719 \nL 54.826563 129.561568 \nL 51.775 129.204484 \nL 48.723438 128.840466 \nL 45.671875 128.469515 \nL 42.620313 128.091629 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_7\">\n    <path clip-path=\"url(#pd05c034e8e)\" d=\"M 210.45625 146.899219 \nL 207.404688 146.89634 \nL 204.353125 146.887702 \nL 201.301563 146.873306 \nL 198.25 146.853151 \nL 195.198438 146.827238 \nL 192.146875 146.795566 \nL 189.095313 146.758136 \nL 186.04375 146.714948 \nL 182.992188 146.666001 \nL 179.940625 146.611295 \nL 176.889063 146.550831 \nL 173.8375 146.484609 \nL 170.785938 146.412628 \nL 167.734375 146.334888 \nL 164.682813 146.25139 \nL 161.63125 146.162134 \nL 158.579688 146.067119 \nL 155.528125 145.966346 \nL 152.476563 145.859814 \nL 149.425 145.747524 \nL 146.373438 145.629475 \nL 143.321875 145.505668 \nL 140.270313 145.376102 \nL 137.21875 145.240778 \nL 134.167188 145.099695 \nL 131.115625 144.952854 \nL 128.064063 144.800255 \nL 125.0125 144.641897 \nL 121.960938 144.47778 \nL 118.909375 144.307905 \nL 115.857813 144.132272 \nL 112.80625 143.95088 \nL 109.754688 143.763729 \nL 106.703125 143.57082 \nL 105.641712 143.501719 \nL 103.651563 143.367607 \nL 100.6 143.156008 \nL 97.548438 142.938449 \nL 94.496875 142.714929 \nL 91.445313 142.485449 \nL 88.39375 142.250008 \nL 85.342188 142.008607 \nL 82.290625 141.761245 \nL 79.239063 141.507923 \nL 76.1875 141.24864 \nL 73.135938 140.983396 \nL 70.084375 140.712192 \nL 67.032813 140.435028 \nL 63.98125 140.151903 \nL 63.477899 140.104219 \nL 60.929688 139.854039 \nL 57.878125 139.548264 \nL 54.826563 139.236312 \nL 51.775 138.918182 \nL 48.723438 138.593876 \nL 45.671875 138.263391 \nL 42.620313 137.92673 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n    <path clip-path=\"url(#pd05c034e8e)\" d=\"M 237.920313 146.666001 \nL 234.86875 146.714948 \nL 231.817188 146.758136 \nL 228.765625 146.795566 \nL 225.714063 146.827238 \nL 222.6625 146.853151 \nL 219.610938 146.873306 \nL 216.559375 146.887702 \nL 213.507813 146.89634 \nL 210.45625 146.899219 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_8\">\n    <path clip-path=\"url(#pd05c034e8e)\" d=\"M 43.320212 146.899219 \nL 42.620313 146.827238 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_9\"/>\n   <g id=\"line2d_9\">\n    <path clip-path=\"url(#pd05c034e8e)\" d=\"M 57.878125 112.924219 \nL 96.477484 69.948869 \nL 120.357142 54.42355 \nL 138.043261 48.294977 \nL 152.011133 46.027885 \nL 163.368487 45.269751 \nL 172.726061 45.04561 \nL 180.468975 44.988536 \nL 186.866078 44.976471 \nL 192.121325 44.97447 \nL 196.40025 44.974235 \nL 199.844228 44.974219 \nL 202.578131 44.974219 \nL 204.714223 44.974219 \nL 206.353865 44.974219 \nL 207.588039 44.974219 \nL 208.497343 44.974219 \nL 209.15187 44.974219 \nL 209.611243 44.974219 \nL 209.924922 44.974219 \nL 210.132825 44.974219 \n\" style=\"fill:none;stroke:#ff7f0e;stroke-linecap:square;stroke-width:1.5;\"/>\n    <defs>\n     <path d=\"M 0 3 \nC 0.795609 3 1.55874 2.683901 2.12132 2.12132 \nC 2.683901 1.55874 3 0.795609 3 0 \nC 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \nC 1.55874 -2.683901 0.795609 -3 0 -3 \nC -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \nC -2.683901 -1.55874 -3 -0.795609 -3 0 \nC -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \nC -1.55874 2.683901 -0.795609 3 0 3 \nz\n\" id=\"m81abf845fe\" style=\"stroke:#ff7f0e;\"/>\n    </defs>\n    <g clip-path=\"url(#pd05c034e8e)\">\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"57.878125\" xlink:href=\"#m81abf845fe\" y=\"112.924219\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"96.477484\" xlink:href=\"#m81abf845fe\" y=\"69.948869\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"120.357142\" xlink:href=\"#m81abf845fe\" y=\"54.42355\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"138.043261\" xlink:href=\"#m81abf845fe\" y=\"48.294977\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"152.011133\" xlink:href=\"#m81abf845fe\" y=\"46.027885\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"163.368487\" xlink:href=\"#m81abf845fe\" y=\"45.269751\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"172.726061\" xlink:href=\"#m81abf845fe\" y=\"45.04561\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"180.468975\" xlink:href=\"#m81abf845fe\" y=\"44.988536\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"186.866078\" xlink:href=\"#m81abf845fe\" y=\"44.976471\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"192.121325\" xlink:href=\"#m81abf845fe\" y=\"44.97447\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"196.40025\" xlink:href=\"#m81abf845fe\" y=\"44.974235\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"199.844228\" xlink:href=\"#m81abf845fe\" y=\"44.974219\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"202.578131\" xlink:href=\"#m81abf845fe\" y=\"44.974219\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"204.714223\" xlink:href=\"#m81abf845fe\" y=\"44.974219\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"206.353865\" xlink:href=\"#m81abf845fe\" y=\"44.974219\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"207.588039\" xlink:href=\"#m81abf845fe\" y=\"44.974219\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"208.497343\" xlink:href=\"#m81abf845fe\" y=\"44.974219\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"209.15187\" xlink:href=\"#m81abf845fe\" y=\"44.974219\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"209.611243\" xlink:href=\"#m81abf845fe\" y=\"44.974219\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"209.924922\" xlink:href=\"#m81abf845fe\" y=\"44.974219\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"210.132825\" xlink:href=\"#m81abf845fe\" y=\"44.974219\"/>\n    </g>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 42.620312 146.899219 \nL 42.620312 10.999219 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 237.920313 146.899219 \nL 237.920313 10.999219 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 42.620313 146.899219 \nL 237.920313 146.899219 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 42.620313 10.999219 \nL 237.920313 10.999219 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"pd05c034e8e\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"42.620312\" y=\"10.999219\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "-5NoUVCfMSGt",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "features, labels = d2l.get_data_ch7()\n",
        "\n",
        "def init_rmsprop_states():\n",
        "    s_w = nd.zeros((features.shape[1], 1))\n",
        "    s_b = nd.zeros(1)\n",
        "    return (s_w, s_b)\n",
        "\n",
        "def rmsprop(params, states, hyperparams):\n",
        "    gamma, eps = hyperparams['gamma'], 1e-6 \n",
        "    for p, s in zip(params, states):\n",
        "        s[:] = gamma * s + (1 - gamma) * p.grad.square()\n",
        "        p[:] -= hyperparams['lr'] * p.grad / (s + eps).sqrt()"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "2ly5K-GwO5Oz",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "95bfeaa1-2c15-44c3-bb85-dcfbaef40dfc"
      },
      "source": [
        "d2l.train_ch7(rmsprop, init_rmsprop_states(), {'lr': 0.01, 'gamma': 0.9}, features, labels)"
      ],
      "execution_count": 44,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "loss: 0.246135, 0.254269 sec per epoch\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 252.64375 180.65625\" width=\"252.64375pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 252.64375 180.65625 \nL 252.64375 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \nL 245.44375 7.2 \nL 50.14375 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m0597579772\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"59.021023\" xlink:href=\"#m0597579772\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- 0.0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n       <path d=\"M 10.6875 12.40625 \nL 21 12.40625 \nL 21 0 \nL 10.6875 0 \nz\n\" id=\"DejaVuSans-46\"/>\n      </defs>\n      <g transform=\"translate(51.06946 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"103.407386\" xlink:href=\"#m0597579772\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- 0.5 -->\n      <defs>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(95.455824 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"147.79375\" xlink:href=\"#m0597579772\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 1.0 -->\n      <defs>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n      </defs>\n      <g transform=\"translate(139.842187 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"192.180114\" xlink:href=\"#m0597579772\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 1.5 -->\n      <g transform=\"translate(184.228551 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"236.566477\" xlink:href=\"#m0597579772\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 2.0 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(228.614915 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_6\">\n     <!-- epoch -->\n     <defs>\n      <path d=\"M 56.203125 29.59375 \nL 56.203125 25.203125 \nL 14.890625 25.203125 \nQ 15.484375 15.921875 20.484375 11.0625 \nQ 25.484375 6.203125 34.421875 6.203125 \nQ 39.59375 6.203125 44.453125 7.46875 \nQ 49.3125 8.734375 54.109375 11.28125 \nL 54.109375 2.78125 \nQ 49.265625 0.734375 44.1875 -0.34375 \nQ 39.109375 -1.421875 33.890625 -1.421875 \nQ 20.796875 -1.421875 13.15625 6.1875 \nQ 5.515625 13.8125 5.515625 26.8125 \nQ 5.515625 40.234375 12.765625 48.109375 \nQ 20.015625 56 32.328125 56 \nQ 43.359375 56 49.78125 48.890625 \nQ 56.203125 41.796875 56.203125 29.59375 \nz\nM 47.21875 32.234375 \nQ 47.125 39.59375 43.09375 43.984375 \nQ 39.0625 48.390625 32.421875 48.390625 \nQ 24.90625 48.390625 20.390625 44.140625 \nQ 15.875 39.890625 15.1875 32.171875 \nz\n\" id=\"DejaVuSans-101\"/>\n      <path d=\"M 18.109375 8.203125 \nL 18.109375 -20.796875 \nL 9.078125 -20.796875 \nL 9.078125 54.6875 \nL 18.109375 54.6875 \nL 18.109375 46.390625 \nQ 20.953125 51.265625 25.265625 53.625 \nQ 29.59375 56 35.59375 56 \nQ 45.5625 56 51.78125 48.09375 \nQ 58.015625 40.1875 58.015625 27.296875 \nQ 58.015625 14.40625 51.78125 6.484375 \nQ 45.5625 -1.421875 35.59375 -1.421875 \nQ 29.59375 -1.421875 25.265625 0.953125 \nQ 20.953125 3.328125 18.109375 8.203125 \nz\nM 48.6875 27.296875 \nQ 48.6875 37.203125 44.609375 42.84375 \nQ 40.53125 48.484375 33.40625 48.484375 \nQ 26.265625 48.484375 22.1875 42.84375 \nQ 18.109375 37.203125 18.109375 27.296875 \nQ 18.109375 17.390625 22.1875 11.75 \nQ 26.265625 6.109375 33.40625 6.109375 \nQ 40.53125 6.109375 44.609375 11.75 \nQ 48.6875 17.390625 48.6875 27.296875 \nz\n\" id=\"DejaVuSans-112\"/>\n      <path d=\"M 30.609375 48.390625 \nQ 23.390625 48.390625 19.1875 42.75 \nQ 14.984375 37.109375 14.984375 27.296875 \nQ 14.984375 17.484375 19.15625 11.84375 \nQ 23.34375 6.203125 30.609375 6.203125 \nQ 37.796875 6.203125 41.984375 11.859375 \nQ 46.1875 17.53125 46.1875 27.296875 \nQ 46.1875 37.015625 41.984375 42.703125 \nQ 37.796875 48.390625 30.609375 48.390625 \nz\nM 30.609375 56 \nQ 42.328125 56 49.015625 48.375 \nQ 55.71875 40.765625 55.71875 27.296875 \nQ 55.71875 13.875 49.015625 6.21875 \nQ 42.328125 -1.421875 30.609375 -1.421875 \nQ 18.84375 -1.421875 12.171875 6.21875 \nQ 5.515625 13.875 5.515625 27.296875 \nQ 5.515625 40.765625 12.171875 48.375 \nQ 18.84375 56 30.609375 56 \nz\n\" id=\"DejaVuSans-111\"/>\n      <path d=\"M 48.78125 52.59375 \nL 48.78125 44.1875 \nQ 44.96875 46.296875 41.140625 47.34375 \nQ 37.3125 48.390625 33.40625 48.390625 \nQ 24.65625 48.390625 19.8125 42.84375 \nQ 14.984375 37.3125 14.984375 27.296875 \nQ 14.984375 17.28125 19.8125 11.734375 \nQ 24.65625 6.203125 33.40625 6.203125 \nQ 37.3125 6.203125 41.140625 7.25 \nQ 44.96875 8.296875 48.78125 10.40625 \nL 48.78125 2.09375 \nQ 45.015625 0.34375 40.984375 -0.53125 \nQ 36.96875 -1.421875 32.421875 -1.421875 \nQ 20.0625 -1.421875 12.78125 6.34375 \nQ 5.515625 14.109375 5.515625 27.296875 \nQ 5.515625 40.671875 12.859375 48.328125 \nQ 20.21875 56 33.015625 56 \nQ 37.15625 56 41.109375 55.140625 \nQ 45.0625 54.296875 48.78125 52.59375 \nz\n\" id=\"DejaVuSans-99\"/>\n      <path d=\"M 54.890625 33.015625 \nL 54.890625 0 \nL 45.90625 0 \nL 45.90625 32.71875 \nQ 45.90625 40.484375 42.875 44.328125 \nQ 39.84375 48.1875 33.796875 48.1875 \nQ 26.515625 48.1875 22.3125 43.546875 \nQ 18.109375 38.921875 18.109375 30.90625 \nL 18.109375 0 \nL 9.078125 0 \nL 9.078125 75.984375 \nL 18.109375 75.984375 \nL 18.109375 46.1875 \nQ 21.34375 51.125 25.703125 53.5625 \nQ 30.078125 56 35.796875 56 \nQ 45.21875 56 50.046875 50.171875 \nQ 54.890625 44.34375 54.890625 33.015625 \nz\n\" id=\"DejaVuSans-104\"/>\n     </defs>\n     <g transform=\"translate(132.565625 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-101\"/>\n      <use x=\"61.523438\" xlink:href=\"#DejaVuSans-112\"/>\n      <use x=\"125\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"186.181641\" xlink:href=\"#DejaVuSans-99\"/>\n      <use x=\"241.162109\" xlink:href=\"#DejaVuSans-104\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_6\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"ma76d6d5bef\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#ma76d6d5bef\" y=\"133.627425\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0.25 -->\n      <g transform=\"translate(20.878125 137.426644)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#ma76d6d5bef\" y=\"109.505506\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0.30 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 113.304725)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#ma76d6d5bef\" y=\"85.383586\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 0.35 -->\n      <g transform=\"translate(20.878125 89.182805)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#ma76d6d5bef\" y=\"61.261667\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 0.40 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(20.878125 65.060886)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#ma76d6d5bef\" y=\"37.139748\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 0.45 -->\n      <g transform=\"translate(20.878125 40.938966)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_11\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#ma76d6d5bef\" y=\"13.017828\"/>\n      </g>\n     </g>\n     <g id=\"text_12\">\n      <!-- 0.50 -->\n      <g transform=\"translate(20.878125 16.817047)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_13\">\n     <!-- loss -->\n     <defs>\n      <path d=\"M 9.421875 75.984375 \nL 18.40625 75.984375 \nL 18.40625 0 \nL 9.421875 0 \nz\n\" id=\"DejaVuSans-108\"/>\n      <path d=\"M 44.28125 53.078125 \nL 44.28125 44.578125 \nQ 40.484375 46.53125 36.375 47.5 \nQ 32.28125 48.484375 27.875 48.484375 \nQ 21.1875 48.484375 17.84375 46.4375 \nQ 14.5 44.390625 14.5 40.28125 \nQ 14.5 37.15625 16.890625 35.375 \nQ 19.28125 33.59375 26.515625 31.984375 \nL 29.59375 31.296875 \nQ 39.15625 29.25 43.1875 25.515625 \nQ 47.21875 21.78125 47.21875 15.09375 \nQ 47.21875 7.46875 41.1875 3.015625 \nQ 35.15625 -1.421875 24.609375 -1.421875 \nQ 20.21875 -1.421875 15.453125 -0.5625 \nQ 10.6875 0.296875 5.421875 2 \nL 5.421875 11.28125 \nQ 10.40625 8.6875 15.234375 7.390625 \nQ 20.0625 6.109375 24.8125 6.109375 \nQ 31.15625 6.109375 34.5625 8.28125 \nQ 37.984375 10.453125 37.984375 14.40625 \nQ 37.984375 18.0625 35.515625 20.015625 \nQ 33.0625 21.96875 24.703125 23.78125 \nL 21.578125 24.515625 \nQ 13.234375 26.265625 9.515625 29.90625 \nQ 5.8125 33.546875 5.8125 39.890625 \nQ 5.8125 47.609375 11.28125 51.796875 \nQ 16.75 56 26.8125 56 \nQ 31.78125 56 36.171875 55.265625 \nQ 40.578125 54.546875 44.28125 53.078125 \nz\n\" id=\"DejaVuSans-115\"/>\n     </defs>\n     <g transform=\"translate(14.798437 84.807812)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-108\"/>\n      <use x=\"27.783203\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"88.964844\" xlink:href=\"#DejaVuSans-115\"/>\n      <use x=\"141.064453\" xlink:href=\"#DejaVuSans-115\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_12\">\n    <path clip-path=\"url(#p289fa9229a)\" d=\"M 59.021023 13.377273 \nL 64.939205 65.219854 \nL 70.857386 90.165022 \nL 76.775568 100.789702 \nL 82.69375 113.302486 \nL 88.611932 121.785091 \nL 94.530114 128.362468 \nL 100.448295 134.545051 \nL 106.366477 135.160622 \nL 112.284659 136.284354 \nL 118.202841 136.61932 \nL 124.121023 135.554358 \nL 130.039205 134.681202 \nL 135.957386 134.95865 \nL 141.875568 135.671903 \nL 147.79375 135.784798 \nL 153.711932 135.644262 \nL 159.630114 136.078521 \nL 165.548295 136.874454 \nL 171.466477 136.922727 \nL 177.384659 132.504564 \nL 183.302841 134.149849 \nL 189.221023 136.620276 \nL 195.139205 136.657119 \nL 201.057386 135.336973 \nL 206.975568 135.522432 \nL 212.89375 135.91166 \nL 218.811932 133.354247 \nL 224.730114 134.521925 \nL 230.648295 135.780333 \nL 236.566477 135.492195 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 50.14375 143.1 \nL 50.14375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 245.44375 143.1 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 50.14375 7.2 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p289fa9229a\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"50.14375\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "ysl88cWHPGde",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "806c0ab0-3606-4cea-9c92-a14f8000f421"
      },
      "source": [
        "d2l.train_gluon_ch7('rmsprop', {'learning_rate': 0.01, 'gamma1': 0.9}, features, labels)"
      ],
      "execution_count": 45,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "loss: 0.245615, 0.181391 sec per epoch\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 252.64375 180.65625\" width=\"252.64375pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 252.64375 180.65625 \nL 252.64375 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \nL 245.44375 7.2 \nL 50.14375 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m38688bd152\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"59.021023\" xlink:href=\"#m38688bd152\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- 0.0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n       <path d=\"M 10.6875 12.40625 \nL 21 12.40625 \nL 21 0 \nL 10.6875 0 \nz\n\" id=\"DejaVuSans-46\"/>\n      </defs>\n      <g transform=\"translate(51.06946 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"103.407386\" xlink:href=\"#m38688bd152\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- 0.5 -->\n      <defs>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(95.455824 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"147.79375\" xlink:href=\"#m38688bd152\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 1.0 -->\n      <defs>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n      </defs>\n      <g transform=\"translate(139.842187 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"192.180114\" xlink:href=\"#m38688bd152\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 1.5 -->\n      <g transform=\"translate(184.228551 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"236.566477\" xlink:href=\"#m38688bd152\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 2.0 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(228.614915 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_6\">\n     <!-- epoch -->\n     <defs>\n      <path d=\"M 56.203125 29.59375 \nL 56.203125 25.203125 \nL 14.890625 25.203125 \nQ 15.484375 15.921875 20.484375 11.0625 \nQ 25.484375 6.203125 34.421875 6.203125 \nQ 39.59375 6.203125 44.453125 7.46875 \nQ 49.3125 8.734375 54.109375 11.28125 \nL 54.109375 2.78125 \nQ 49.265625 0.734375 44.1875 -0.34375 \nQ 39.109375 -1.421875 33.890625 -1.421875 \nQ 20.796875 -1.421875 13.15625 6.1875 \nQ 5.515625 13.8125 5.515625 26.8125 \nQ 5.515625 40.234375 12.765625 48.109375 \nQ 20.015625 56 32.328125 56 \nQ 43.359375 56 49.78125 48.890625 \nQ 56.203125 41.796875 56.203125 29.59375 \nz\nM 47.21875 32.234375 \nQ 47.125 39.59375 43.09375 43.984375 \nQ 39.0625 48.390625 32.421875 48.390625 \nQ 24.90625 48.390625 20.390625 44.140625 \nQ 15.875 39.890625 15.1875 32.171875 \nz\n\" id=\"DejaVuSans-101\"/>\n      <path d=\"M 18.109375 8.203125 \nL 18.109375 -20.796875 \nL 9.078125 -20.796875 \nL 9.078125 54.6875 \nL 18.109375 54.6875 \nL 18.109375 46.390625 \nQ 20.953125 51.265625 25.265625 53.625 \nQ 29.59375 56 35.59375 56 \nQ 45.5625 56 51.78125 48.09375 \nQ 58.015625 40.1875 58.015625 27.296875 \nQ 58.015625 14.40625 51.78125 6.484375 \nQ 45.5625 -1.421875 35.59375 -1.421875 \nQ 29.59375 -1.421875 25.265625 0.953125 \nQ 20.953125 3.328125 18.109375 8.203125 \nz\nM 48.6875 27.296875 \nQ 48.6875 37.203125 44.609375 42.84375 \nQ 40.53125 48.484375 33.40625 48.484375 \nQ 26.265625 48.484375 22.1875 42.84375 \nQ 18.109375 37.203125 18.109375 27.296875 \nQ 18.109375 17.390625 22.1875 11.75 \nQ 26.265625 6.109375 33.40625 6.109375 \nQ 40.53125 6.109375 44.609375 11.75 \nQ 48.6875 17.390625 48.6875 27.296875 \nz\n\" id=\"DejaVuSans-112\"/>\n      <path d=\"M 30.609375 48.390625 \nQ 23.390625 48.390625 19.1875 42.75 \nQ 14.984375 37.109375 14.984375 27.296875 \nQ 14.984375 17.484375 19.15625 11.84375 \nQ 23.34375 6.203125 30.609375 6.203125 \nQ 37.796875 6.203125 41.984375 11.859375 \nQ 46.1875 17.53125 46.1875 27.296875 \nQ 46.1875 37.015625 41.984375 42.703125 \nQ 37.796875 48.390625 30.609375 48.390625 \nz\nM 30.609375 56 \nQ 42.328125 56 49.015625 48.375 \nQ 55.71875 40.765625 55.71875 27.296875 \nQ 55.71875 13.875 49.015625 6.21875 \nQ 42.328125 -1.421875 30.609375 -1.421875 \nQ 18.84375 -1.421875 12.171875 6.21875 \nQ 5.515625 13.875 5.515625 27.296875 \nQ 5.515625 40.765625 12.171875 48.375 \nQ 18.84375 56 30.609375 56 \nz\n\" id=\"DejaVuSans-111\"/>\n      <path d=\"M 48.78125 52.59375 \nL 48.78125 44.1875 \nQ 44.96875 46.296875 41.140625 47.34375 \nQ 37.3125 48.390625 33.40625 48.390625 \nQ 24.65625 48.390625 19.8125 42.84375 \nQ 14.984375 37.3125 14.984375 27.296875 \nQ 14.984375 17.28125 19.8125 11.734375 \nQ 24.65625 6.203125 33.40625 6.203125 \nQ 37.3125 6.203125 41.140625 7.25 \nQ 44.96875 8.296875 48.78125 10.40625 \nL 48.78125 2.09375 \nQ 45.015625 0.34375 40.984375 -0.53125 \nQ 36.96875 -1.421875 32.421875 -1.421875 \nQ 20.0625 -1.421875 12.78125 6.34375 \nQ 5.515625 14.109375 5.515625 27.296875 \nQ 5.515625 40.671875 12.859375 48.328125 \nQ 20.21875 56 33.015625 56 \nQ 37.15625 56 41.109375 55.140625 \nQ 45.0625 54.296875 48.78125 52.59375 \nz\n\" id=\"DejaVuSans-99\"/>\n      <path d=\"M 54.890625 33.015625 \nL 54.890625 0 \nL 45.90625 0 \nL 45.90625 32.71875 \nQ 45.90625 40.484375 42.875 44.328125 \nQ 39.84375 48.1875 33.796875 48.1875 \nQ 26.515625 48.1875 22.3125 43.546875 \nQ 18.109375 38.921875 18.109375 30.90625 \nL 18.109375 0 \nL 9.078125 0 \nL 9.078125 75.984375 \nL 18.109375 75.984375 \nL 18.109375 46.1875 \nQ 21.34375 51.125 25.703125 53.5625 \nQ 30.078125 56 35.796875 56 \nQ 45.21875 56 50.046875 50.171875 \nQ 54.890625 44.34375 54.890625 33.015625 \nz\n\" id=\"DejaVuSans-104\"/>\n     </defs>\n     <g transform=\"translate(132.565625 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-101\"/>\n      <use x=\"61.523438\" xlink:href=\"#DejaVuSans-112\"/>\n      <use x=\"125\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"186.181641\" xlink:href=\"#DejaVuSans-99\"/>\n      <use x=\"241.162109\" xlink:href=\"#DejaVuSans-104\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_6\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m63db9ab134\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m63db9ab134\" y=\"133.570768\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0.25 -->\n      <g transform=\"translate(20.878125 137.369987)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m63db9ab134\" y=\"109.549863\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0.30 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 113.349082)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m63db9ab134\" y=\"85.528958\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 0.35 -->\n      <g transform=\"translate(20.878125 89.328176)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m63db9ab134\" y=\"61.508053\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 0.40 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(20.878125 65.307271)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m63db9ab134\" y=\"37.487147\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 0.45 -->\n      <g transform=\"translate(20.878125 41.286366)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_11\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m63db9ab134\" y=\"13.466242\"/>\n      </g>\n     </g>\n     <g id=\"text_12\">\n      <!-- 0.50 -->\n      <g transform=\"translate(20.878125 17.265461)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_13\">\n     <!-- loss -->\n     <defs>\n      <path d=\"M 9.421875 75.984375 \nL 18.40625 75.984375 \nL 18.40625 0 \nL 9.421875 0 \nz\n\" id=\"DejaVuSans-108\"/>\n      <path d=\"M 44.28125 53.078125 \nL 44.28125 44.578125 \nQ 40.484375 46.53125 36.375 47.5 \nQ 32.28125 48.484375 27.875 48.484375 \nQ 21.1875 48.484375 17.84375 46.4375 \nQ 14.5 44.390625 14.5 40.28125 \nQ 14.5 37.15625 16.890625 35.375 \nQ 19.28125 33.59375 26.515625 31.984375 \nL 29.59375 31.296875 \nQ 39.15625 29.25 43.1875 25.515625 \nQ 47.21875 21.78125 47.21875 15.09375 \nQ 47.21875 7.46875 41.1875 3.015625 \nQ 35.15625 -1.421875 24.609375 -1.421875 \nQ 20.21875 -1.421875 15.453125 -0.5625 \nQ 10.6875 0.296875 5.421875 2 \nL 5.421875 11.28125 \nQ 10.40625 8.6875 15.234375 7.390625 \nQ 20.0625 6.109375 24.8125 6.109375 \nQ 31.15625 6.109375 34.5625 8.28125 \nQ 37.984375 10.453125 37.984375 14.40625 \nQ 37.984375 18.0625 35.515625 20.015625 \nQ 33.0625 21.96875 24.703125 23.78125 \nL 21.578125 24.515625 \nQ 13.234375 26.265625 9.515625 29.90625 \nQ 5.8125 33.546875 5.8125 39.890625 \nQ 5.8125 47.609375 11.28125 51.796875 \nQ 16.75 56 26.8125 56 \nQ 31.78125 56 36.171875 55.265625 \nQ 40.578125 54.546875 44.28125 53.078125 \nz\n\" id=\"DejaVuSans-115\"/>\n     </defs>\n     <g transform=\"translate(14.798437 84.807812)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-108\"/>\n      <use x=\"27.783203\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"88.964844\" xlink:href=\"#DejaVuSans-115\"/>\n      <use x=\"141.064453\" xlink:href=\"#DejaVuSans-115\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_12\">\n    <path clip-path=\"url(#p995f01de4b)\" d=\"M 59.021023 13.377273 \nL 64.939205 57.124882 \nL 70.857386 74.36917 \nL 76.775568 94.194387 \nL 82.69375 106.087094 \nL 88.611932 115.963172 \nL 94.530114 121.01036 \nL 100.448295 126.016815 \nL 106.366477 130.694367 \nL 112.284659 133.349333 \nL 118.202841 135.414421 \nL 124.121023 135.323569 \nL 130.039205 135.157893 \nL 135.957386 135.575207 \nL 141.875568 135.68624 \nL 147.79375 136.660802 \nL 153.711932 136.400107 \nL 159.630114 136.613654 \nL 165.548295 136.677324 \nL 171.466477 136.06126 \nL 177.384659 135.759431 \nL 183.302841 135.707043 \nL 189.221023 136.30627 \nL 195.139205 132.852613 \nL 201.057386 132.439093 \nL 206.975568 134.804292 \nL 212.89375 134.339815 \nL 218.811932 134.607096 \nL 224.730114 136.471903 \nL 230.648295 136.922727 \nL 236.566477 135.677399 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 50.14375 143.1 \nL 50.14375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 245.44375 143.1 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 50.14375 7.2 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p995f01de4b\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"50.14375\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "O6FAOcV3Ph-E",
        "colab_type": "text"
      },
      "source": [
        "## 7.7 AdaDelta 算法"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "x3-ASK0NPpPs",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "%matplotlib inline \n",
        "import d2lzh as d2l \n",
        "from mxnet import nd \n",
        "\n",
        "features, labels = d2l.get_data_ch7()\n",
        "\n",
        "def init_adadelta_states():\n",
        "    s_w, s_b = nd.zeros((features.shape[1], 1)), nd.zeros(1)\n",
        "    delta_w, delta_b = nd.zeros((features.shape[1], 1)), nd.zeros(1)\n",
        "    return ((s_w, delta_w), (s_b, delta_b))\n",
        "\n",
        "def adadelta(params, states, hyperparams):\n",
        "    rho, eps = hyperparams['rho'], 1e-5 \n",
        "    for p, (s, delta) in zip(params, states):\n",
        "        s[:] = rho * s + (1 - rho) * p.grad.square()\n",
        "        g = ((delta + eps).sqrt() / (s + eps).sqrt()) * p.grad \n",
        "        p[:] -= g \n",
        "        delta[:] = rho * delta + (1 - rho) * g * g "
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "-fln9vYLRvgA",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "4db84f14-5a42-45be-a7d5-1b63ff064677"
      },
      "source": [
        "d2l.train_ch7(adadelta, init_adadelta_states(), {'rho': 0.9}, features, labels)"
      ],
      "execution_count": 47,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "loss: 0.243357, 0.253646 sec per epoch\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 252.64375 180.65625\" width=\"252.64375pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 252.64375 180.65625 \nL 252.64375 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \nL 245.44375 7.2 \nL 50.14375 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"mc0a38ee78b\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"59.021023\" xlink:href=\"#mc0a38ee78b\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- 0.0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n       <path d=\"M 10.6875 12.40625 \nL 21 12.40625 \nL 21 0 \nL 10.6875 0 \nz\n\" id=\"DejaVuSans-46\"/>\n      </defs>\n      <g transform=\"translate(51.06946 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"103.407386\" xlink:href=\"#mc0a38ee78b\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- 0.5 -->\n      <defs>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(95.455824 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"147.79375\" xlink:href=\"#mc0a38ee78b\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 1.0 -->\n      <defs>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n      </defs>\n      <g transform=\"translate(139.842187 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"192.180114\" xlink:href=\"#mc0a38ee78b\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 1.5 -->\n      <g transform=\"translate(184.228551 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"236.566477\" xlink:href=\"#mc0a38ee78b\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 2.0 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(228.614915 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_6\">\n     <!-- epoch -->\n     <defs>\n      <path d=\"M 56.203125 29.59375 \nL 56.203125 25.203125 \nL 14.890625 25.203125 \nQ 15.484375 15.921875 20.484375 11.0625 \nQ 25.484375 6.203125 34.421875 6.203125 \nQ 39.59375 6.203125 44.453125 7.46875 \nQ 49.3125 8.734375 54.109375 11.28125 \nL 54.109375 2.78125 \nQ 49.265625 0.734375 44.1875 -0.34375 \nQ 39.109375 -1.421875 33.890625 -1.421875 \nQ 20.796875 -1.421875 13.15625 6.1875 \nQ 5.515625 13.8125 5.515625 26.8125 \nQ 5.515625 40.234375 12.765625 48.109375 \nQ 20.015625 56 32.328125 56 \nQ 43.359375 56 49.78125 48.890625 \nQ 56.203125 41.796875 56.203125 29.59375 \nz\nM 47.21875 32.234375 \nQ 47.125 39.59375 43.09375 43.984375 \nQ 39.0625 48.390625 32.421875 48.390625 \nQ 24.90625 48.390625 20.390625 44.140625 \nQ 15.875 39.890625 15.1875 32.171875 \nz\n\" id=\"DejaVuSans-101\"/>\n      <path d=\"M 18.109375 8.203125 \nL 18.109375 -20.796875 \nL 9.078125 -20.796875 \nL 9.078125 54.6875 \nL 18.109375 54.6875 \nL 18.109375 46.390625 \nQ 20.953125 51.265625 25.265625 53.625 \nQ 29.59375 56 35.59375 56 \nQ 45.5625 56 51.78125 48.09375 \nQ 58.015625 40.1875 58.015625 27.296875 \nQ 58.015625 14.40625 51.78125 6.484375 \nQ 45.5625 -1.421875 35.59375 -1.421875 \nQ 29.59375 -1.421875 25.265625 0.953125 \nQ 20.953125 3.328125 18.109375 8.203125 \nz\nM 48.6875 27.296875 \nQ 48.6875 37.203125 44.609375 42.84375 \nQ 40.53125 48.484375 33.40625 48.484375 \nQ 26.265625 48.484375 22.1875 42.84375 \nQ 18.109375 37.203125 18.109375 27.296875 \nQ 18.109375 17.390625 22.1875 11.75 \nQ 26.265625 6.109375 33.40625 6.109375 \nQ 40.53125 6.109375 44.609375 11.75 \nQ 48.6875 17.390625 48.6875 27.296875 \nz\n\" id=\"DejaVuSans-112\"/>\n      <path d=\"M 30.609375 48.390625 \nQ 23.390625 48.390625 19.1875 42.75 \nQ 14.984375 37.109375 14.984375 27.296875 \nQ 14.984375 17.484375 19.15625 11.84375 \nQ 23.34375 6.203125 30.609375 6.203125 \nQ 37.796875 6.203125 41.984375 11.859375 \nQ 46.1875 17.53125 46.1875 27.296875 \nQ 46.1875 37.015625 41.984375 42.703125 \nQ 37.796875 48.390625 30.609375 48.390625 \nz\nM 30.609375 56 \nQ 42.328125 56 49.015625 48.375 \nQ 55.71875 40.765625 55.71875 27.296875 \nQ 55.71875 13.875 49.015625 6.21875 \nQ 42.328125 -1.421875 30.609375 -1.421875 \nQ 18.84375 -1.421875 12.171875 6.21875 \nQ 5.515625 13.875 5.515625 27.296875 \nQ 5.515625 40.765625 12.171875 48.375 \nQ 18.84375 56 30.609375 56 \nz\n\" id=\"DejaVuSans-111\"/>\n      <path d=\"M 48.78125 52.59375 \nL 48.78125 44.1875 \nQ 44.96875 46.296875 41.140625 47.34375 \nQ 37.3125 48.390625 33.40625 48.390625 \nQ 24.65625 48.390625 19.8125 42.84375 \nQ 14.984375 37.3125 14.984375 27.296875 \nQ 14.984375 17.28125 19.8125 11.734375 \nQ 24.65625 6.203125 33.40625 6.203125 \nQ 37.3125 6.203125 41.140625 7.25 \nQ 44.96875 8.296875 48.78125 10.40625 \nL 48.78125 2.09375 \nQ 45.015625 0.34375 40.984375 -0.53125 \nQ 36.96875 -1.421875 32.421875 -1.421875 \nQ 20.0625 -1.421875 12.78125 6.34375 \nQ 5.515625 14.109375 5.515625 27.296875 \nQ 5.515625 40.671875 12.859375 48.328125 \nQ 20.21875 56 33.015625 56 \nQ 37.15625 56 41.109375 55.140625 \nQ 45.0625 54.296875 48.78125 52.59375 \nz\n\" id=\"DejaVuSans-99\"/>\n      <path d=\"M 54.890625 33.015625 \nL 54.890625 0 \nL 45.90625 0 \nL 45.90625 32.71875 \nQ 45.90625 40.484375 42.875 44.328125 \nQ 39.84375 48.1875 33.796875 48.1875 \nQ 26.515625 48.1875 22.3125 43.546875 \nQ 18.109375 38.921875 18.109375 30.90625 \nL 18.109375 0 \nL 9.078125 0 \nL 9.078125 75.984375 \nL 18.109375 75.984375 \nL 18.109375 46.1875 \nQ 21.34375 51.125 25.703125 53.5625 \nQ 30.078125 56 35.796875 56 \nQ 45.21875 56 50.046875 50.171875 \nQ 54.890625 44.34375 54.890625 33.015625 \nz\n\" id=\"DejaVuSans-104\"/>\n     </defs>\n     <g transform=\"translate(132.565625 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-101\"/>\n      <use x=\"61.523438\" xlink:href=\"#DejaVuSans-112\"/>\n      <use x=\"125\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"186.181641\" xlink:href=\"#DejaVuSans-99\"/>\n      <use x=\"241.162109\" xlink:href=\"#DejaVuSans-104\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_6\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m7bcc69b346\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m7bcc69b346\" y=\"133.585505\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0.25 -->\n      <g transform=\"translate(20.878125 137.384724)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m7bcc69b346\" y=\"109.794693\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0.30 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 113.593912)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m7bcc69b346\" y=\"86.003882\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 0.35 -->\n      <g transform=\"translate(20.878125 89.8031)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m7bcc69b346\" y=\"62.21307\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 0.40 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(20.878125 66.012289)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m7bcc69b346\" y=\"38.422258\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 0.45 -->\n      <g transform=\"translate(20.878125 42.221477)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_11\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m7bcc69b346\" y=\"14.631447\"/>\n      </g>\n     </g>\n     <g id=\"text_12\">\n      <!-- 0.50 -->\n      <g transform=\"translate(20.878125 18.430665)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_13\">\n     <!-- loss -->\n     <defs>\n      <path d=\"M 9.421875 75.984375 \nL 18.40625 75.984375 \nL 18.40625 0 \nL 9.421875 0 \nz\n\" id=\"DejaVuSans-108\"/>\n      <path d=\"M 44.28125 53.078125 \nL 44.28125 44.578125 \nQ 40.484375 46.53125 36.375 47.5 \nQ 32.28125 48.484375 27.875 48.484375 \nQ 21.1875 48.484375 17.84375 46.4375 \nQ 14.5 44.390625 14.5 40.28125 \nQ 14.5 37.15625 16.890625 35.375 \nQ 19.28125 33.59375 26.515625 31.984375 \nL 29.59375 31.296875 \nQ 39.15625 29.25 43.1875 25.515625 \nQ 47.21875 21.78125 47.21875 15.09375 \nQ 47.21875 7.46875 41.1875 3.015625 \nQ 35.15625 -1.421875 24.609375 -1.421875 \nQ 20.21875 -1.421875 15.453125 -0.5625 \nQ 10.6875 0.296875 5.421875 2 \nL 5.421875 11.28125 \nQ 10.40625 8.6875 15.234375 7.390625 \nQ 20.0625 6.109375 24.8125 6.109375 \nQ 31.15625 6.109375 34.5625 8.28125 \nQ 37.984375 10.453125 37.984375 14.40625 \nQ 37.984375 18.0625 35.515625 20.015625 \nQ 33.0625 21.96875 24.703125 23.78125 \nL 21.578125 24.515625 \nQ 13.234375 26.265625 9.515625 29.90625 \nQ 5.8125 33.546875 5.8125 39.890625 \nQ 5.8125 47.609375 11.28125 51.796875 \nQ 16.75 56 26.8125 56 \nQ 31.78125 56 36.171875 55.265625 \nQ 40.578125 54.546875 44.28125 53.078125 \nz\n\" id=\"DejaVuSans-115\"/>\n     </defs>\n     <g transform=\"translate(14.798437 84.807812)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-108\"/>\n      <use x=\"27.783203\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"88.964844\" xlink:href=\"#DejaVuSans-115\"/>\n      <use x=\"141.064453\" xlink:href=\"#DejaVuSans-115\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_12\">\n    <path clip-path=\"url(#p92e1023431)\" d=\"M 59.021023 13.377273 \nL 64.939205 54.133683 \nL 70.857386 76.656571 \nL 76.775568 93.376148 \nL 82.69375 107.42433 \nL 88.611932 113.512257 \nL 94.530114 118.448039 \nL 100.448295 125.076482 \nL 106.366477 128.533968 \nL 112.284659 130.394951 \nL 118.202841 133.064956 \nL 124.121023 134.076779 \nL 130.039205 133.147046 \nL 135.957386 134.37661 \nL 141.875568 136.191067 \nL 147.79375 135.827154 \nL 153.711932 135.841845 \nL 159.630114 135.872589 \nL 165.548295 134.593961 \nL 171.466477 136.444634 \nL 177.384659 135.759599 \nL 183.302841 136.303369 \nL 189.221023 136.42225 \nL 195.139205 136.554844 \nL 201.057386 134.020887 \nL 206.975568 136.849351 \nL 212.89375 136.766012 \nL 218.811932 136.922727 \nL 224.730114 136.81938 \nL 230.648295 136.138727 \nL 236.566477 136.746372 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 50.14375 143.1 \nL 50.14375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 245.44375 143.1 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 50.14375 7.2 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p92e1023431\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"50.14375\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "Jd1Ks5ymR-E9",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "99d82a67-780d-4fd6-a0b4-5901ba86be27"
      },
      "source": [
        "d2l.train_gluon_ch7('adadelta', {'rho': 0.9}, features, labels)"
      ],
      "execution_count": 48,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "loss: 0.246860, 0.286474 sec per epoch\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 252.64375 180.65625\" width=\"252.64375pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 252.64375 180.65625 \nL 252.64375 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \nL 245.44375 7.2 \nL 50.14375 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"ma29ca71ca0\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"59.021023\" xlink:href=\"#ma29ca71ca0\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- 0.0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n       <path d=\"M 10.6875 12.40625 \nL 21 12.40625 \nL 21 0 \nL 10.6875 0 \nz\n\" id=\"DejaVuSans-46\"/>\n      </defs>\n      <g transform=\"translate(51.06946 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"103.407386\" xlink:href=\"#ma29ca71ca0\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- 0.5 -->\n      <defs>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(95.455824 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"147.79375\" xlink:href=\"#ma29ca71ca0\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 1.0 -->\n      <defs>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n      </defs>\n      <g transform=\"translate(139.842187 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"192.180114\" xlink:href=\"#ma29ca71ca0\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 1.5 -->\n      <g transform=\"translate(184.228551 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"236.566477\" xlink:href=\"#ma29ca71ca0\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 2.0 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(228.614915 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_6\">\n     <!-- epoch -->\n     <defs>\n      <path d=\"M 56.203125 29.59375 \nL 56.203125 25.203125 \nL 14.890625 25.203125 \nQ 15.484375 15.921875 20.484375 11.0625 \nQ 25.484375 6.203125 34.421875 6.203125 \nQ 39.59375 6.203125 44.453125 7.46875 \nQ 49.3125 8.734375 54.109375 11.28125 \nL 54.109375 2.78125 \nQ 49.265625 0.734375 44.1875 -0.34375 \nQ 39.109375 -1.421875 33.890625 -1.421875 \nQ 20.796875 -1.421875 13.15625 6.1875 \nQ 5.515625 13.8125 5.515625 26.8125 \nQ 5.515625 40.234375 12.765625 48.109375 \nQ 20.015625 56 32.328125 56 \nQ 43.359375 56 49.78125 48.890625 \nQ 56.203125 41.796875 56.203125 29.59375 \nz\nM 47.21875 32.234375 \nQ 47.125 39.59375 43.09375 43.984375 \nQ 39.0625 48.390625 32.421875 48.390625 \nQ 24.90625 48.390625 20.390625 44.140625 \nQ 15.875 39.890625 15.1875 32.171875 \nz\n\" id=\"DejaVuSans-101\"/>\n      <path d=\"M 18.109375 8.203125 \nL 18.109375 -20.796875 \nL 9.078125 -20.796875 \nL 9.078125 54.6875 \nL 18.109375 54.6875 \nL 18.109375 46.390625 \nQ 20.953125 51.265625 25.265625 53.625 \nQ 29.59375 56 35.59375 56 \nQ 45.5625 56 51.78125 48.09375 \nQ 58.015625 40.1875 58.015625 27.296875 \nQ 58.015625 14.40625 51.78125 6.484375 \nQ 45.5625 -1.421875 35.59375 -1.421875 \nQ 29.59375 -1.421875 25.265625 0.953125 \nQ 20.953125 3.328125 18.109375 8.203125 \nz\nM 48.6875 27.296875 \nQ 48.6875 37.203125 44.609375 42.84375 \nQ 40.53125 48.484375 33.40625 48.484375 \nQ 26.265625 48.484375 22.1875 42.84375 \nQ 18.109375 37.203125 18.109375 27.296875 \nQ 18.109375 17.390625 22.1875 11.75 \nQ 26.265625 6.109375 33.40625 6.109375 \nQ 40.53125 6.109375 44.609375 11.75 \nQ 48.6875 17.390625 48.6875 27.296875 \nz\n\" id=\"DejaVuSans-112\"/>\n      <path d=\"M 30.609375 48.390625 \nQ 23.390625 48.390625 19.1875 42.75 \nQ 14.984375 37.109375 14.984375 27.296875 \nQ 14.984375 17.484375 19.15625 11.84375 \nQ 23.34375 6.203125 30.609375 6.203125 \nQ 37.796875 6.203125 41.984375 11.859375 \nQ 46.1875 17.53125 46.1875 27.296875 \nQ 46.1875 37.015625 41.984375 42.703125 \nQ 37.796875 48.390625 30.609375 48.390625 \nz\nM 30.609375 56 \nQ 42.328125 56 49.015625 48.375 \nQ 55.71875 40.765625 55.71875 27.296875 \nQ 55.71875 13.875 49.015625 6.21875 \nQ 42.328125 -1.421875 30.609375 -1.421875 \nQ 18.84375 -1.421875 12.171875 6.21875 \nQ 5.515625 13.875 5.515625 27.296875 \nQ 5.515625 40.765625 12.171875 48.375 \nQ 18.84375 56 30.609375 56 \nz\n\" id=\"DejaVuSans-111\"/>\n      <path d=\"M 48.78125 52.59375 \nL 48.78125 44.1875 \nQ 44.96875 46.296875 41.140625 47.34375 \nQ 37.3125 48.390625 33.40625 48.390625 \nQ 24.65625 48.390625 19.8125 42.84375 \nQ 14.984375 37.3125 14.984375 27.296875 \nQ 14.984375 17.28125 19.8125 11.734375 \nQ 24.65625 6.203125 33.40625 6.203125 \nQ 37.3125 6.203125 41.140625 7.25 \nQ 44.96875 8.296875 48.78125 10.40625 \nL 48.78125 2.09375 \nQ 45.015625 0.34375 40.984375 -0.53125 \nQ 36.96875 -1.421875 32.421875 -1.421875 \nQ 20.0625 -1.421875 12.78125 6.34375 \nQ 5.515625 14.109375 5.515625 27.296875 \nQ 5.515625 40.671875 12.859375 48.328125 \nQ 20.21875 56 33.015625 56 \nQ 37.15625 56 41.109375 55.140625 \nQ 45.0625 54.296875 48.78125 52.59375 \nz\n\" id=\"DejaVuSans-99\"/>\n      <path d=\"M 54.890625 33.015625 \nL 54.890625 0 \nL 45.90625 0 \nL 45.90625 32.71875 \nQ 45.90625 40.484375 42.875 44.328125 \nQ 39.84375 48.1875 33.796875 48.1875 \nQ 26.515625 48.1875 22.3125 43.546875 \nQ 18.109375 38.921875 18.109375 30.90625 \nL 18.109375 0 \nL 9.078125 0 \nL 9.078125 75.984375 \nL 18.109375 75.984375 \nL 18.109375 46.1875 \nQ 21.34375 51.125 25.703125 53.5625 \nQ 30.078125 56 35.796875 56 \nQ 45.21875 56 50.046875 50.171875 \nQ 54.890625 44.34375 54.890625 33.015625 \nz\n\" id=\"DejaVuSans-104\"/>\n     </defs>\n     <g transform=\"translate(132.565625 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-101\"/>\n      <use x=\"61.523438\" xlink:href=\"#DejaVuSans-112\"/>\n      <use x=\"125\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"186.181641\" xlink:href=\"#DejaVuSans-99\"/>\n      <use x=\"241.162109\" xlink:href=\"#DejaVuSans-104\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_6\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"mffd8fe4340\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mffd8fe4340\" y=\"133.799157\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0.25 -->\n      <g transform=\"translate(20.878125 137.598376)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mffd8fe4340\" y=\"110.3612\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0.30 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 114.160418)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mffd8fe4340\" y=\"86.923242\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 0.35 -->\n      <g transform=\"translate(20.878125 90.722461)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mffd8fe4340\" y=\"63.485285\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 0.40 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(20.878125 67.284503)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mffd8fe4340\" y=\"40.047327\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 0.45 -->\n      <g transform=\"translate(20.878125 43.846546)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_11\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mffd8fe4340\" y=\"16.60937\"/>\n      </g>\n     </g>\n     <g id=\"text_12\">\n      <!-- 0.50 -->\n      <g transform=\"translate(20.878125 20.408588)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_13\">\n     <!-- loss -->\n     <defs>\n      <path d=\"M 9.421875 75.984375 \nL 18.40625 75.984375 \nL 18.40625 0 \nL 9.421875 0 \nz\n\" id=\"DejaVuSans-108\"/>\n      <path d=\"M 44.28125 53.078125 \nL 44.28125 44.578125 \nQ 40.484375 46.53125 36.375 47.5 \nQ 32.28125 48.484375 27.875 48.484375 \nQ 21.1875 48.484375 17.84375 46.4375 \nQ 14.5 44.390625 14.5 40.28125 \nQ 14.5 37.15625 16.890625 35.375 \nQ 19.28125 33.59375 26.515625 31.984375 \nL 29.59375 31.296875 \nQ 39.15625 29.25 43.1875 25.515625 \nQ 47.21875 21.78125 47.21875 15.09375 \nQ 47.21875 7.46875 41.1875 3.015625 \nQ 35.15625 -1.421875 24.609375 -1.421875 \nQ 20.21875 -1.421875 15.453125 -0.5625 \nQ 10.6875 0.296875 5.421875 2 \nL 5.421875 11.28125 \nQ 10.40625 8.6875 15.234375 7.390625 \nQ 20.0625 6.109375 24.8125 6.109375 \nQ 31.15625 6.109375 34.5625 8.28125 \nQ 37.984375 10.453125 37.984375 14.40625 \nQ 37.984375 18.0625 35.515625 20.015625 \nQ 33.0625 21.96875 24.703125 23.78125 \nL 21.578125 24.515625 \nQ 13.234375 26.265625 9.515625 29.90625 \nQ 5.8125 33.546875 5.8125 39.890625 \nQ 5.8125 47.609375 11.28125 51.796875 \nQ 16.75 56 26.8125 56 \nQ 31.78125 56 36.171875 55.265625 \nQ 40.578125 54.546875 44.28125 53.078125 \nz\n\" id=\"DejaVuSans-115\"/>\n     </defs>\n     <g transform=\"translate(14.798437 84.807812)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-108\"/>\n      <use x=\"27.783203\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"88.964844\" xlink:href=\"#DejaVuSans-115\"/>\n      <use x=\"141.064453\" xlink:href=\"#DejaVuSans-115\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_12\">\n    <path clip-path=\"url(#p0ebb48c0f5)\" d=\"M 59.021023 13.377273 \nL 64.939205 39.185684 \nL 70.857386 57.331671 \nL 76.775568 71.743476 \nL 82.69375 85.766226 \nL 88.611932 95.558073 \nL 94.530114 105.053893 \nL 100.448295 111.551727 \nL 106.366477 116.867773 \nL 112.284659 122.869641 \nL 118.202841 126.692464 \nL 124.121023 129.22551 \nL 130.039205 131.91322 \nL 135.957386 132.921331 \nL 141.875568 132.639792 \nL 147.79375 134.791817 \nL 153.711932 134.648582 \nL 159.630114 134.354211 \nL 165.548295 135.486125 \nL 171.466477 136.17592 \nL 177.384659 136.026496 \nL 183.302841 136.304543 \nL 189.221023 136.526954 \nL 195.139205 135.584782 \nL 201.057386 136.438125 \nL 206.975568 136.922727 \nL 212.89375 136.090255 \nL 218.811932 134.068235 \nL 224.730114 135.578824 \nL 230.648295 136.615538 \nL 236.566477 135.270908 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 50.14375 143.1 \nL 50.14375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 245.44375 143.1 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 50.14375 7.2 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p0ebb48c0f5\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"50.14375\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "QrdQZ0THSPrz",
        "colab_type": "text"
      },
      "source": [
        "## 7.8 Adam 算法"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "-teP9-bJSbK3",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "%matplotlib inline \n",
        "import d2lzh as d2l \n",
        "from mxnet import nd \n",
        "\n",
        "features, labels = d2l.get_data_ch7()\n",
        "\n",
        "def init_adam_states():\n",
        "    v_w, v_b = nd.zeros((features.shape[1], 1)), nd.zeros(1)\n",
        "    s_w, s_b = nd.zeros((features.shape[1], 1)), nd.zeros(1)\n",
        "    return ((v_w, s_w), (v_b, s_b))\n",
        "\n",
        "def adam(params, states, hyperparams):\n",
        "    beta1, beta2, eps = 0.9, 0.999, 1e-6 \n",
        "    for p, (v, s) in zip(params, states):\n",
        "        v[:] = beta1 * v + (1 - beta1) * p.grad \n",
        "        s[:] = beta2 * s + (1 - beta2) * p.grad.square()\n",
        "        v_bias_corr = v / (1 - beta1 ** hyperparams['t'])\n",
        "        s_bias_corr = s / (1 - beta2 ** hyperparams['t'])\n",
        "        p[:] -= hyperparams['lr'] * v_bias_corr / (s_bias_corr.sqrt() + eps)\n",
        "    hyperparams['t'] += 1 "
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "7DgBUTAvXrZx",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "d4cc75ae-5061-4db6-d3a5-cf6aad07fdb3"
      },
      "source": [
        "d2l.train_ch7(adam, init_adam_states(), {'lr': 0.01, 't': 1}, features, labels)"
      ],
      "execution_count": 54,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "loss: 0.245369, 0.325748 sec per epoch\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 252.64375 180.65625\" width=\"252.64375pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 252.64375 180.65625 \nL 252.64375 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \nL 245.44375 7.2 \nL 50.14375 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m5f80717113\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"59.021023\" xlink:href=\"#m5f80717113\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- 0.0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n       <path d=\"M 10.6875 12.40625 \nL 21 12.40625 \nL 21 0 \nL 10.6875 0 \nz\n\" id=\"DejaVuSans-46\"/>\n      </defs>\n      <g transform=\"translate(51.06946 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"103.407386\" xlink:href=\"#m5f80717113\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- 0.5 -->\n      <defs>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(95.455824 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"147.79375\" xlink:href=\"#m5f80717113\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 1.0 -->\n      <defs>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n      </defs>\n      <g transform=\"translate(139.842187 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"192.180114\" xlink:href=\"#m5f80717113\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 1.5 -->\n      <g transform=\"translate(184.228551 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"236.566477\" xlink:href=\"#m5f80717113\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 2.0 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(228.614915 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_6\">\n     <!-- epoch -->\n     <defs>\n      <path d=\"M 56.203125 29.59375 \nL 56.203125 25.203125 \nL 14.890625 25.203125 \nQ 15.484375 15.921875 20.484375 11.0625 \nQ 25.484375 6.203125 34.421875 6.203125 \nQ 39.59375 6.203125 44.453125 7.46875 \nQ 49.3125 8.734375 54.109375 11.28125 \nL 54.109375 2.78125 \nQ 49.265625 0.734375 44.1875 -0.34375 \nQ 39.109375 -1.421875 33.890625 -1.421875 \nQ 20.796875 -1.421875 13.15625 6.1875 \nQ 5.515625 13.8125 5.515625 26.8125 \nQ 5.515625 40.234375 12.765625 48.109375 \nQ 20.015625 56 32.328125 56 \nQ 43.359375 56 49.78125 48.890625 \nQ 56.203125 41.796875 56.203125 29.59375 \nz\nM 47.21875 32.234375 \nQ 47.125 39.59375 43.09375 43.984375 \nQ 39.0625 48.390625 32.421875 48.390625 \nQ 24.90625 48.390625 20.390625 44.140625 \nQ 15.875 39.890625 15.1875 32.171875 \nz\n\" id=\"DejaVuSans-101\"/>\n      <path d=\"M 18.109375 8.203125 \nL 18.109375 -20.796875 \nL 9.078125 -20.796875 \nL 9.078125 54.6875 \nL 18.109375 54.6875 \nL 18.109375 46.390625 \nQ 20.953125 51.265625 25.265625 53.625 \nQ 29.59375 56 35.59375 56 \nQ 45.5625 56 51.78125 48.09375 \nQ 58.015625 40.1875 58.015625 27.296875 \nQ 58.015625 14.40625 51.78125 6.484375 \nQ 45.5625 -1.421875 35.59375 -1.421875 \nQ 29.59375 -1.421875 25.265625 0.953125 \nQ 20.953125 3.328125 18.109375 8.203125 \nz\nM 48.6875 27.296875 \nQ 48.6875 37.203125 44.609375 42.84375 \nQ 40.53125 48.484375 33.40625 48.484375 \nQ 26.265625 48.484375 22.1875 42.84375 \nQ 18.109375 37.203125 18.109375 27.296875 \nQ 18.109375 17.390625 22.1875 11.75 \nQ 26.265625 6.109375 33.40625 6.109375 \nQ 40.53125 6.109375 44.609375 11.75 \nQ 48.6875 17.390625 48.6875 27.296875 \nz\n\" id=\"DejaVuSans-112\"/>\n      <path d=\"M 30.609375 48.390625 \nQ 23.390625 48.390625 19.1875 42.75 \nQ 14.984375 37.109375 14.984375 27.296875 \nQ 14.984375 17.484375 19.15625 11.84375 \nQ 23.34375 6.203125 30.609375 6.203125 \nQ 37.796875 6.203125 41.984375 11.859375 \nQ 46.1875 17.53125 46.1875 27.296875 \nQ 46.1875 37.015625 41.984375 42.703125 \nQ 37.796875 48.390625 30.609375 48.390625 \nz\nM 30.609375 56 \nQ 42.328125 56 49.015625 48.375 \nQ 55.71875 40.765625 55.71875 27.296875 \nQ 55.71875 13.875 49.015625 6.21875 \nQ 42.328125 -1.421875 30.609375 -1.421875 \nQ 18.84375 -1.421875 12.171875 6.21875 \nQ 5.515625 13.875 5.515625 27.296875 \nQ 5.515625 40.765625 12.171875 48.375 \nQ 18.84375 56 30.609375 56 \nz\n\" id=\"DejaVuSans-111\"/>\n      <path d=\"M 48.78125 52.59375 \nL 48.78125 44.1875 \nQ 44.96875 46.296875 41.140625 47.34375 \nQ 37.3125 48.390625 33.40625 48.390625 \nQ 24.65625 48.390625 19.8125 42.84375 \nQ 14.984375 37.3125 14.984375 27.296875 \nQ 14.984375 17.28125 19.8125 11.734375 \nQ 24.65625 6.203125 33.40625 6.203125 \nQ 37.3125 6.203125 41.140625 7.25 \nQ 44.96875 8.296875 48.78125 10.40625 \nL 48.78125 2.09375 \nQ 45.015625 0.34375 40.984375 -0.53125 \nQ 36.96875 -1.421875 32.421875 -1.421875 \nQ 20.0625 -1.421875 12.78125 6.34375 \nQ 5.515625 14.109375 5.515625 27.296875 \nQ 5.515625 40.671875 12.859375 48.328125 \nQ 20.21875 56 33.015625 56 \nQ 37.15625 56 41.109375 55.140625 \nQ 45.0625 54.296875 48.78125 52.59375 \nz\n\" id=\"DejaVuSans-99\"/>\n      <path d=\"M 54.890625 33.015625 \nL 54.890625 0 \nL 45.90625 0 \nL 45.90625 32.71875 \nQ 45.90625 40.484375 42.875 44.328125 \nQ 39.84375 48.1875 33.796875 48.1875 \nQ 26.515625 48.1875 22.3125 43.546875 \nQ 18.109375 38.921875 18.109375 30.90625 \nL 18.109375 0 \nL 9.078125 0 \nL 9.078125 75.984375 \nL 18.109375 75.984375 \nL 18.109375 46.1875 \nQ 21.34375 51.125 25.703125 53.5625 \nQ 30.078125 56 35.796875 56 \nQ 45.21875 56 50.046875 50.171875 \nQ 54.890625 44.34375 54.890625 33.015625 \nz\n\" id=\"DejaVuSans-104\"/>\n     </defs>\n     <g transform=\"translate(132.565625 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-101\"/>\n      <use x=\"61.523438\" xlink:href=\"#DejaVuSans-112\"/>\n      <use x=\"125\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"186.181641\" xlink:href=\"#DejaVuSans-99\"/>\n      <use x=\"241.162109\" xlink:href=\"#DejaVuSans-104\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_6\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m8ac300d60b\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m8ac300d60b\" y=\"133.366787\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0.25 -->\n      <g transform=\"translate(20.878125 137.166006)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m8ac300d60b\" y=\"109.60578\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0.30 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 113.404999)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m8ac300d60b\" y=\"85.844773\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 0.35 -->\n      <g transform=\"translate(20.878125 89.643992)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m8ac300d60b\" y=\"62.083767\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 0.40 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(20.878125 65.882985)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m8ac300d60b\" y=\"38.32276\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 0.45 -->\n      <g transform=\"translate(20.878125 42.121978)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_11\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m8ac300d60b\" y=\"14.561753\"/>\n      </g>\n     </g>\n     <g id=\"text_12\">\n      <!-- 0.50 -->\n      <g transform=\"translate(20.878125 18.360972)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_13\">\n     <!-- loss -->\n     <defs>\n      <path d=\"M 9.421875 75.984375 \nL 18.40625 75.984375 \nL 18.40625 0 \nL 9.421875 0 \nz\n\" id=\"DejaVuSans-108\"/>\n      <path d=\"M 44.28125 53.078125 \nL 44.28125 44.578125 \nQ 40.484375 46.53125 36.375 47.5 \nQ 32.28125 48.484375 27.875 48.484375 \nQ 21.1875 48.484375 17.84375 46.4375 \nQ 14.5 44.390625 14.5 40.28125 \nQ 14.5 37.15625 16.890625 35.375 \nQ 19.28125 33.59375 26.515625 31.984375 \nL 29.59375 31.296875 \nQ 39.15625 29.25 43.1875 25.515625 \nQ 47.21875 21.78125 47.21875 15.09375 \nQ 47.21875 7.46875 41.1875 3.015625 \nQ 35.15625 -1.421875 24.609375 -1.421875 \nQ 20.21875 -1.421875 15.453125 -0.5625 \nQ 10.6875 0.296875 5.421875 2 \nL 5.421875 11.28125 \nQ 10.40625 8.6875 15.234375 7.390625 \nQ 20.0625 6.109375 24.8125 6.109375 \nQ 31.15625 6.109375 34.5625 8.28125 \nQ 37.984375 10.453125 37.984375 14.40625 \nQ 37.984375 18.0625 35.515625 20.015625 \nQ 33.0625 21.96875 24.703125 23.78125 \nL 21.578125 24.515625 \nQ 13.234375 26.265625 9.515625 29.90625 \nQ 5.8125 33.546875 5.8125 39.890625 \nQ 5.8125 47.609375 11.28125 51.796875 \nQ 16.75 56 26.8125 56 \nQ 31.78125 56 36.171875 55.265625 \nQ 40.578125 54.546875 44.28125 53.078125 \nz\n\" id=\"DejaVuSans-115\"/>\n     </defs>\n     <g transform=\"translate(14.798437 84.807812)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-108\"/>\n      <use x=\"27.783203\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"88.964844\" xlink:href=\"#DejaVuSans-115\"/>\n      <use x=\"141.064453\" xlink:href=\"#DejaVuSans-115\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_12\">\n    <path clip-path=\"url(#p92c35ca196)\" d=\"M 59.021023 13.377273 \nL 64.939205 51.943296 \nL 70.857386 76.077084 \nL 76.775568 94.306699 \nL 82.69375 108.369133 \nL 88.611932 120.041278 \nL 94.530114 126.753347 \nL 100.448295 129.53056 \nL 106.366477 130.946997 \nL 112.284659 132.215164 \nL 118.202841 133.69165 \nL 124.121023 134.410384 \nL 130.039205 135.147147 \nL 135.957386 135.831034 \nL 141.875568 136.225903 \nL 147.79375 136.585875 \nL 153.711932 136.127791 \nL 159.630114 135.390787 \nL 165.548295 135.432263 \nL 171.466477 136.043622 \nL 177.384659 136.139596 \nL 183.302841 136.271854 \nL 189.221023 136.494519 \nL 195.139205 136.822647 \nL 201.057386 136.922727 \nL 206.975568 136.646407 \nL 212.89375 136.162985 \nL 218.811932 135.634279 \nL 224.730114 136.370256 \nL 230.648295 136.489923 \nL 236.566477 135.567615 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 50.14375 143.1 \nL 50.14375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 245.44375 143.1 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 50.14375 7.2 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p92c35ca196\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"50.14375\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "DGyVi6SPX8MJ",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 279
        },
        "outputId": "e0e63e5d-276a-413a-b4cf-6864b6c81698"
      },
      "source": [
        "d2l.train_gluon_ch7('adam', {'learning_rate': 0.01}, features, labels)"
      ],
      "execution_count": 55,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "loss: 0.242758, 0.140634 sec per epoch\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 252.64375 180.65625\" width=\"252.64375pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 252.64375 180.65625 \nL 252.64375 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \nL 245.44375 7.2 \nL 50.14375 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"ma80c4bb7ec\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"59.021023\" xlink:href=\"#ma80c4bb7ec\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- 0.0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n       <path d=\"M 10.6875 12.40625 \nL 21 12.40625 \nL 21 0 \nL 10.6875 0 \nz\n\" id=\"DejaVuSans-46\"/>\n      </defs>\n      <g transform=\"translate(51.06946 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"103.407386\" xlink:href=\"#ma80c4bb7ec\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- 0.5 -->\n      <defs>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(95.455824 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"147.79375\" xlink:href=\"#ma80c4bb7ec\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 1.0 -->\n      <defs>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n      </defs>\n      <g transform=\"translate(139.842187 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"192.180114\" xlink:href=\"#ma80c4bb7ec\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 1.5 -->\n      <g transform=\"translate(184.228551 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"236.566477\" xlink:href=\"#ma80c4bb7ec\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 2.0 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(228.614915 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_6\">\n     <!-- epoch -->\n     <defs>\n      <path d=\"M 56.203125 29.59375 \nL 56.203125 25.203125 \nL 14.890625 25.203125 \nQ 15.484375 15.921875 20.484375 11.0625 \nQ 25.484375 6.203125 34.421875 6.203125 \nQ 39.59375 6.203125 44.453125 7.46875 \nQ 49.3125 8.734375 54.109375 11.28125 \nL 54.109375 2.78125 \nQ 49.265625 0.734375 44.1875 -0.34375 \nQ 39.109375 -1.421875 33.890625 -1.421875 \nQ 20.796875 -1.421875 13.15625 6.1875 \nQ 5.515625 13.8125 5.515625 26.8125 \nQ 5.515625 40.234375 12.765625 48.109375 \nQ 20.015625 56 32.328125 56 \nQ 43.359375 56 49.78125 48.890625 \nQ 56.203125 41.796875 56.203125 29.59375 \nz\nM 47.21875 32.234375 \nQ 47.125 39.59375 43.09375 43.984375 \nQ 39.0625 48.390625 32.421875 48.390625 \nQ 24.90625 48.390625 20.390625 44.140625 \nQ 15.875 39.890625 15.1875 32.171875 \nz\n\" id=\"DejaVuSans-101\"/>\n      <path d=\"M 18.109375 8.203125 \nL 18.109375 -20.796875 \nL 9.078125 -20.796875 \nL 9.078125 54.6875 \nL 18.109375 54.6875 \nL 18.109375 46.390625 \nQ 20.953125 51.265625 25.265625 53.625 \nQ 29.59375 56 35.59375 56 \nQ 45.5625 56 51.78125 48.09375 \nQ 58.015625 40.1875 58.015625 27.296875 \nQ 58.015625 14.40625 51.78125 6.484375 \nQ 45.5625 -1.421875 35.59375 -1.421875 \nQ 29.59375 -1.421875 25.265625 0.953125 \nQ 20.953125 3.328125 18.109375 8.203125 \nz\nM 48.6875 27.296875 \nQ 48.6875 37.203125 44.609375 42.84375 \nQ 40.53125 48.484375 33.40625 48.484375 \nQ 26.265625 48.484375 22.1875 42.84375 \nQ 18.109375 37.203125 18.109375 27.296875 \nQ 18.109375 17.390625 22.1875 11.75 \nQ 26.265625 6.109375 33.40625 6.109375 \nQ 40.53125 6.109375 44.609375 11.75 \nQ 48.6875 17.390625 48.6875 27.296875 \nz\n\" id=\"DejaVuSans-112\"/>\n      <path d=\"M 30.609375 48.390625 \nQ 23.390625 48.390625 19.1875 42.75 \nQ 14.984375 37.109375 14.984375 27.296875 \nQ 14.984375 17.484375 19.15625 11.84375 \nQ 23.34375 6.203125 30.609375 6.203125 \nQ 37.796875 6.203125 41.984375 11.859375 \nQ 46.1875 17.53125 46.1875 27.296875 \nQ 46.1875 37.015625 41.984375 42.703125 \nQ 37.796875 48.390625 30.609375 48.390625 \nz\nM 30.609375 56 \nQ 42.328125 56 49.015625 48.375 \nQ 55.71875 40.765625 55.71875 27.296875 \nQ 55.71875 13.875 49.015625 6.21875 \nQ 42.328125 -1.421875 30.609375 -1.421875 \nQ 18.84375 -1.421875 12.171875 6.21875 \nQ 5.515625 13.875 5.515625 27.296875 \nQ 5.515625 40.765625 12.171875 48.375 \nQ 18.84375 56 30.609375 56 \nz\n\" id=\"DejaVuSans-111\"/>\n      <path d=\"M 48.78125 52.59375 \nL 48.78125 44.1875 \nQ 44.96875 46.296875 41.140625 47.34375 \nQ 37.3125 48.390625 33.40625 48.390625 \nQ 24.65625 48.390625 19.8125 42.84375 \nQ 14.984375 37.3125 14.984375 27.296875 \nQ 14.984375 17.28125 19.8125 11.734375 \nQ 24.65625 6.203125 33.40625 6.203125 \nQ 37.3125 6.203125 41.140625 7.25 \nQ 44.96875 8.296875 48.78125 10.40625 \nL 48.78125 2.09375 \nQ 45.015625 0.34375 40.984375 -0.53125 \nQ 36.96875 -1.421875 32.421875 -1.421875 \nQ 20.0625 -1.421875 12.78125 6.34375 \nQ 5.515625 14.109375 5.515625 27.296875 \nQ 5.515625 40.671875 12.859375 48.328125 \nQ 20.21875 56 33.015625 56 \nQ 37.15625 56 41.109375 55.140625 \nQ 45.0625 54.296875 48.78125 52.59375 \nz\n\" id=\"DejaVuSans-99\"/>\n      <path d=\"M 54.890625 33.015625 \nL 54.890625 0 \nL 45.90625 0 \nL 45.90625 32.71875 \nQ 45.90625 40.484375 42.875 44.328125 \nQ 39.84375 48.1875 33.796875 48.1875 \nQ 26.515625 48.1875 22.3125 43.546875 \nQ 18.109375 38.921875 18.109375 30.90625 \nL 18.109375 0 \nL 9.078125 0 \nL 9.078125 75.984375 \nL 18.109375 75.984375 \nL 18.109375 46.1875 \nQ 21.34375 51.125 25.703125 53.5625 \nQ 30.078125 56 35.796875 56 \nQ 45.21875 56 50.046875 50.171875 \nQ 54.890625 44.34375 54.890625 33.015625 \nz\n\" id=\"DejaVuSans-104\"/>\n     </defs>\n     <g transform=\"translate(132.565625 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-101\"/>\n      <use x=\"61.523438\" xlink:href=\"#DejaVuSans-112\"/>\n      <use x=\"125\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"186.181641\" xlink:href=\"#DejaVuSans-99\"/>\n      <use x=\"241.162109\" xlink:href=\"#DejaVuSans-104\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_6\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m8fc394cfea\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m8fc394cfea\" y=\"133.473216\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0.25 -->\n      <g transform=\"translate(20.878125 137.272435)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m8fc394cfea\" y=\"109.65797\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0.30 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 113.457189)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m8fc394cfea\" y=\"85.842723\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 0.35 -->\n      <g transform=\"translate(20.878125 89.641942)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m8fc394cfea\" y=\"62.027477\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 0.40 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(20.878125 65.826696)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m8fc394cfea\" y=\"38.212231\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 0.45 -->\n      <g transform=\"translate(20.878125 42.011449)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_11\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#m8fc394cfea\" y=\"14.396984\"/>\n      </g>\n     </g>\n     <g id=\"text_12\">\n      <!-- 0.50 -->\n      <g transform=\"translate(20.878125 18.196203)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-53\"/>\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_13\">\n     <!-- loss -->\n     <defs>\n      <path d=\"M 9.421875 75.984375 \nL 18.40625 75.984375 \nL 18.40625 0 \nL 9.421875 0 \nz\n\" id=\"DejaVuSans-108\"/>\n      <path d=\"M 44.28125 53.078125 \nL 44.28125 44.578125 \nQ 40.484375 46.53125 36.375 47.5 \nQ 32.28125 48.484375 27.875 48.484375 \nQ 21.1875 48.484375 17.84375 46.4375 \nQ 14.5 44.390625 14.5 40.28125 \nQ 14.5 37.15625 16.890625 35.375 \nQ 19.28125 33.59375 26.515625 31.984375 \nL 29.59375 31.296875 \nQ 39.15625 29.25 43.1875 25.515625 \nQ 47.21875 21.78125 47.21875 15.09375 \nQ 47.21875 7.46875 41.1875 3.015625 \nQ 35.15625 -1.421875 24.609375 -1.421875 \nQ 20.21875 -1.421875 15.453125 -0.5625 \nQ 10.6875 0.296875 5.421875 2 \nL 5.421875 11.28125 \nQ 10.40625 8.6875 15.234375 7.390625 \nQ 20.0625 6.109375 24.8125 6.109375 \nQ 31.15625 6.109375 34.5625 8.28125 \nQ 37.984375 10.453125 37.984375 14.40625 \nQ 37.984375 18.0625 35.515625 20.015625 \nQ 33.0625 21.96875 24.703125 23.78125 \nL 21.578125 24.515625 \nQ 13.234375 26.265625 9.515625 29.90625 \nQ 5.8125 33.546875 5.8125 39.890625 \nQ 5.8125 47.609375 11.28125 51.796875 \nQ 16.75 56 26.8125 56 \nQ 31.78125 56 36.171875 55.265625 \nQ 40.578125 54.546875 44.28125 53.078125 \nz\n\" id=\"DejaVuSans-115\"/>\n     </defs>\n     <g transform=\"translate(14.798437 84.807812)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-108\"/>\n      <use x=\"27.783203\" xlink:href=\"#DejaVuSans-111\"/>\n      <use x=\"88.964844\" xlink:href=\"#DejaVuSans-115\"/>\n      <use x=\"141.064453\" xlink:href=\"#DejaVuSans-115\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_12\">\n    <path clip-path=\"url(#p6be7e44dea)\" d=\"M 59.021023 13.377273 \nL 64.939205 51.616724 \nL 70.857386 77.022383 \nL 76.775568 93.482585 \nL 82.69375 106.046417 \nL 88.611932 114.74413 \nL 94.530114 122.756437 \nL 100.448295 128.342578 \nL 106.366477 131.420067 \nL 112.284659 133.936228 \nL 118.202841 135.21272 \nL 124.121023 135.003671 \nL 130.039205 135.04808 \nL 135.957386 136.576568 \nL 141.875568 136.221679 \nL 147.79375 136.425349 \nL 153.711932 136.379946 \nL 159.630114 136.114237 \nL 165.548295 136.698972 \nL 171.466477 135.935671 \nL 177.384659 135.997058 \nL 183.302841 136.817791 \nL 189.221023 136.316736 \nL 195.139205 135.967724 \nL 201.057386 136.251616 \nL 206.975568 136.101987 \nL 212.89375 136.545978 \nL 218.811932 136.046747 \nL 224.730114 136.017314 \nL 230.648295 136.683307 \nL 236.566477 136.922727 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 50.14375 143.1 \nL 50.14375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 245.44375 143.1 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 50.14375 143.1 \nL 245.44375 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 50.14375 7.2 \nL 245.44375 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p6be7e44dea\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"50.14375\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    }
  ]
}